This is the mail archive of the 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]

Re: "introduce no new bootstrap warning" criteria. was: Loop iv debugging, patch

 > From: Geoff Keating <>
 > > From: "Kaveh R. Ghazi" <>
 > >
 > > I looked into what it would take to turn on -Werror and/or
 > > -pedatic-errors and that doesn't seem possible.  There are too many
 > > unfixable messages requiring a pragma silencer and also many warnings
 > > only appear on unusual platforms so we'd have a real hard time getting
 > > this to work without breaking bootstrap on lots of systems.  Plus any
 > > time a new warning is added to -Wall, it would break systems until
 > > completely silenced also.
 > Why do we have unfixable warnings in -Wall?  They're not supposed
 > to be there.

Recall that if we activate -Werror, we must have zero warnings on all
platforms, even old strange broken ones.  Here are some examples of
annoying or impossible to fix problems:

* On solaris, the system header definition of __GTHREAD_ONCE_INIT
causes missing initializer warnings.  Generically, any warning caused
by a macro defined in system headers but used in user code is trouble.
Checking in_system_header doesn't work for these.

* On systems where %p isn't supported, the backup method for printing
pointers using appropriate sized integer specifiers always causes
-Wformat warnings.  I don't think this one has a solution.

* On non-POSIX/non-USG "BSD" systems, e.g. sunos4, we don't include
string.h in tsystem.h.  This causes numerous implicit decl warnings
for the string functions.  We can't provide the backup decls because
they might conflict with platforms that do supply them and we can't
use autoconf in tsystem.h to confitionally provide them.

* On K&R systems, many system header prototypes (especially those
returning int which exist implicitly) aren't available unless one
defines __USE_FIXED_PROTOTYPES__.  We might want to define that during
bootstrap, but I don't know if it is safe for all platforms.
Otherwise it would have been done already.

My point is that -Werror requires *every* platform to have zero
warnings.  I think we could get *some* platforms down to zero, but its
not possible to get *all* of them IMHO.

Kaveh R. Ghazi			Engagement Manager / Project Services		Qwest Internet Solutions

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