www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/12/03/10:36:21

Message-ID: <04fd01c29ae1$30ba25a0$0600000a@broadpark.no>
From: "Gisle Vanem" <giva AT bgnett DOT no>
To: <djgpp AT delorie DOT com>
Subject: gcc 3.2.1 version
Date: Tue, 3 Dec 2002 16:32:28 +0100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Reply-To: djgpp AT delorie DOT com

The latest gcc doesn't seem to define '_GNUC_PATCHLEVEL'.

This little program prints "gcc 3.2", not "gcc 3.2.1" as I would expect.

------------------------------------------

#include <stdio.h>

int main (void)
{
  char buf[30], *p = buf;

  p += sprintf (p, "gcc %d.%d", __GNUC__, __GNUC_MINOR__);

  #if defined(__GNUC_PATCHLEVEL)
  p += sprintf (p, ".%d", __GNUC_PATCHLEVEL);
  #endif

  puts (buf);
  return (0);
}

------------------------------------------

I've checked the \djgpp\lib\gcc-lib\djgpp\3.21\specs file. It does have 
-D__GNUC_PATCHLEVEL__=%v3

Gisle V.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019