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: [wwwdocs] Add various new warnings for GCC 7


On Fri, Jan 27, 2017 at 09:32:05PM +0100, Gerald Pfeifer wrote:
> On Fri, 27 Jan 2017, Jakub Jelinek wrote:
> > For -Wregister I think it would be better to write more:
> >     <li><code>-Wregister</code> warns about uses of <code>register</code> storage
> >           specifier.  In C++17 this keyword has been removed and for C++17
> >           this is a pedantic warning enabled by default.  The warning is not
> > 	  emitted for the GNU Explicit Register Variables extension.</li>
> 
> Is C++17 correct in both cases?  If the register keyword has been 
> removed, wouldn't that be an error as opposed to just a warning?

For C++17 it is a pedwarn, i.e. an error with -pedantic-errors, or
-Werror=register, warning otherwise, no diagnostics with -Wno-register.
For C++14 and ealier it is (non-default) normal warning, i.e. a warning
with -Wregister, no warning by default or with -Wno-register, error with
-Werror=register.

	Jakub


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