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

Zack Weinberg zack@codesourcery.com
Fri Sep 20 08:50:00 GMT 2002


On Thu, Sep 19, 2002 at 10:25:25PM -0400, John David Anglin wrote:
> > When compiled with gcc, libiberty/md5.c gets many warnings of the form
> > 
> > libiberty/md5.c:407:58: warning: function-like macro "FI" must be used with arguments in traditional C
> > 
> > Your patch does not address this issue.  Is it actually a problem?
> 
> It doesn't cause a problem with respect to compilation with either the vax
> pcc or hpux traditional compilers.  However, I am not sure functionality
> is tested.  dwarf2out.c appears to use the md5 module.  However,
> we don't generate dwarf2 debug output on either vax ultrix or the
> 32-bit hpux port.  Possibly, this could be a problem on the 64-bit
> hpux port.

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.

However, it looks like md5.c could be changed to avoid this warning at
the expense of some readability.

Neil, thoughts?

zw



More information about the Gcc-patches mailing list