This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix warnings and errors building libiberty with pcc on vax-dec-ultrix4.3
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: zack at codesourcery dot com (Zack Weinberg)
- Cc: gcc-patches at gcc dot gnu dot org, neil at daikokuya dot co dot uk
- Date: Fri, 20 Sep 2002 13:13:43 -0400 (EDT)
- Subject: 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)