Maurice Lombardi wrote:
used the function builtin_define_with_int_value()
which was unknown during gpc compilation and made it to fail In fact this function is prototyped and defined in c-common.c While compiling gcc, c-common.o is linked into, which makes success, but this is not the case for gpc.
Yes, the c-* files are the C frontend. The corresponding function for GPC is attached.
I made a quick look with the new gp.exe with 3.2.3 DJGPP and __DJGPP__ are defined (but not __DJGPP) with 3.3.3 __DJGPP and __DJGPP__ are defined (but not DJGPP)
(this is what results from the above hunk since flag_iso=1 in p/lang.c).
I don't know if we should set flag_iso. IMHO it's a backend bug since the target files use C specific flags which don't make much sense in Pascal.
But since in GPC macros are active by default, it may be better to leave it so, so `DJGPP' will not be defined (in gcc-3.3.3 and above) and will not "pollute the namespace" (since macros are outside of any scope). We should just remember to test `{$ifdef __DJGPP__}' etc. with underscores.
but in a C program all three are defined,
Perhaps flag_iso is not on by default. Something like `-std=c89' might turn it on.
Frank