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 to deprecate casts as lvalues for C


"Zack Weinberg" <zack@codesourcery.com> writes:

| Gabriel Dos Reis <gdr@integrable-solutions.net> writes:
| 
| > |  I fail to see the  problem.
| >
| > The problem is inappropriate use of pedwarn.  If you don't want the
| > diagnostic to turn into an error if -pedantic, don't use it. Use warning.
| 
| Your statement is only true for the C++ front end.  The C++ front end
| appears to have dispensed with the distinction between -pedantic and
| -pedantic-errors, which is fine -- but should not be generalized to
| other front ends without due consideration.

I have no intention to generalize C++ behaviour to other front-ends.
I just want to make just that something is not being accidently used.

| Furthermore, since this diagnostic is mandatory (constraint violation,
| C99 6.5.2.4p1 for instance) in the C front end pedantic MUST be used.
| The intent is that -pedantic-errors (but not -pedantic!) should cause
| a hard error for all mandatory diagnostics.
| 
| The code Joseph wrote is correct.

If you and Joseph believe it is correct as is, that is fine.

-- Gaby


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