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]

Wclobbered (PR7651 Define -Wextra strictly in terms of other warning flags)

:ADDPATCH middle-end:

This patch continues the effort to fix PR7651 [1].

It adds a new option -Wclobbered [*] that takes over the function of
warning about variables that might be changed by "longjmp" or "vfork".
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

OK for mainline?

[*] The hardest part is to come up with good names, suggestions are welcome.


2006-12-17 Manuel Lopez-Ibanez <>

   PR middle-end/7651
   * c.opt (Wclobbered): New.
   * doc/invoke.texi (Wclobbered) : Document it.
   (Wextra): Enabled by -Wextra.
   * c-opts.c (c_common_post_options): Enabled by -Wextra.
   * flow.c (rest_of_handle_life): Replace Wextra with Wclobbered.
   * function.c (setjmp_vars_warning): Only warn for Wclobbered.
   (setjmp_args_warning): Likewise

2006-12-17  Manuel Lopez-Ibanez  <>

   PR middle-end/7651
   * gcc.dg/attr-returns_twice-1.c: Replace Wextra with Wclobbered.
   * gcc.dg/setjmp-1.c: Add explicit Wclobbered.

Attachment: wclobbered.diff
Description: Text document

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