This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix warnings and errors building libiberty with pcc on vax-dec-ultrix4.3


> The warning is there because K+R preprocessors are reported to cause
> compile-time errors when function-like macros are used without
> arguments.  If PCC and the HPUX traditional compiler are fine with it,
> perhaps we don't need that warning after all.  I wish I'd kept around
> the copy of the original Reiser cpp that I got sent awhile ago.

Here is the expansion of line 356 using the vax cpp with some
whitespace removed:

 do { A += (C ^ (D & (B ^ C))) + correct_words[1] + (md5_uint32) 0xf61e2562; (A = (A << 5) | (A >> (32 - 5))); A += B; } while (0);

The original line had somewhat more whitespace than the same line expanded
with gcc but it looks like the macro FG was in fact correctly expanded.
Thus, it seems this cpp problem doesn't affect all K&R compilers and
maybe we don't need the warning.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]