Mail Archives: djgpp/2002/12/05/08:54:38
"Hans-Bernhard Broeker" <broeker AT physik DOT rwth-aachen DOT de> said:
>
> > This little program prints "gcc 3.2", not "gcc 3.2.1" as I would expect.
>
> > p += sprintf (p, "gcc %d.%d", __GNUC__, __GNUC_MINOR__);
>
> > #if defined(__GNUC_PATCHLEVEL)
> > p += sprintf (p, ".%d", __GNUC_PATCHLEVEL);
> > #endif
>
> This strikes me as a strange mixup of macro names you're using. Since
> you're already referring to __GNUC__ and __GNUC_MINOR__, the name for
> the patchlevel macro should obvsiously be __GNUC_PATCHLEVEL__ (with
> two __ at the end), too.
Ah yes, you're right. It's __GNUC_PATCHLEVEL__.
--gv
- Raw text -