This is the mail archive of the gcc@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] | |
Giovanni Bajo wrote:
you certainly don't want to regard the use of unary minus on unsigned as something you warn about.
What's the rationale for this? I know that other compilers do implement this
warning and I indeed found it useful in the past.
To me, unary minus on unsigned is both useful, and has a clear and expected meaning (take the twos complement). I would find it most
irritating to get warnings on this. If it is really the case that
many/most C programmers are bamboozled by this standard usage in
the language, perhaps there is an argument for a warning that can
be turned on, but I certainly would not want to see this in -Wall.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |