[PATCH] fix warning about duplicate 'const'

Gabriel Dos Reis gdr@integrable-solutions.net
Wed Mar 10 23:42:00 GMT 2004


Richard Henderson <rth@redhat.com> writes:

| On Wed, Mar 10, 2004 at 11:20:03AM +0100, Gabriel Dos Reis wrote:
| > I would suggest the existing practice (in nearby language) for this:
| > 
| >    (1) reject "direct" duplicate cv-qualifiers, .e.g.
| > 
| >          const const int i = 90;       // ERROR
| 
| Perhaps you meant pedwarn, not error?

pedwarn is OK if it makes everybody happy :-)

| The following has been through the test suite, and doesn't warn
| for *any* duplicated qualifiers.  I chose this because that's
| what C99 does, and that's easier to document and more forward
| compatible.

OK. Thanks!

-- Gaby



More information about the Gcc mailing list