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: PR7651 Define -Wextra strictly in terms of other warning flags


"Manuel López-Ibáñez" <lopezibanez@gmail.com> writes:

| :ADDPATCH middle-end:
| 
| It has been an outstanding issue for a long time that some warnings
| cannot be individually enabled/disabled. The most striking example of
| this is -Wextra [1]. The warnings emitted by -Wextra are considered,
| at the same time, questionable or hard to suppress and still useful in
| some cases. Thus, the ability to individually control each of them is
| a desirable characteristic frequently requested by users [2].
| 
| [1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7651
| [2] http://kerneltrap.org/node/7434
| 
| The following patch is a little step towards that goal. It adds a new
| option -Wempty-body that takes over the function of warning for an
| empty body occurring in an if or else statement. The new option is
| enabled by -Wextra, so we keep the current behaviour but add the
| ability to enable/disable this individual warning.
| 
| Bootstrapped and regression tested with --enable-languages=all on
| i686-pc-linux-gnu.
| 
| OK for mainline?

Yes, after modified as suggested by Ian.

-- Gaby


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