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: PATCH: Wno-warning-directives [WasRe: cpplib: Start moving ...]


On Mon, 12 Aug 2002, Richard Henderson wrote:

> > At a guess, the list looks alphabetically sorted.
> 
> Yes.  And a binary search applied, so it _must_ be sorted.
> There is in fact a comment to that effect at the top of
> the array declaration.

A --enable-checking test at startup that the array _is_ sorted would be a
good idea.  (I put various sanity tests on the attribute tables in
init_attributes; they don't need to be sorted but there are various other
ways they could be wrong that are tested there; the same principle applies
to any tables that could be edited in a way that's wrong but not
immediately obviously wrong.)

(I don't see the use of this warning option, though.  Also, the Texinfo
needs to use @code{} around #warning, and the specification isn't clear
about whether with this option you still get -pedantic warnings for
#warning being an extension.)

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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