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]
Other format: [Raw text]

Re: Patch to deprecate casts as lvalues for C

"Zack Weinberg" <> writes:

| Gabriel Dos Reis <> 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 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]