https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67064

--- Comment #16 from Jens Maurer <jens.maurer at gmx dot net> ---
(In reply to Jason Merrill from comment #14)
>      '-Wpedantic' does not cause warning messages for use of the
>      alternate keywords whose names begin and end with '__'.  Pedantic
>      warnings are also disabled in the expression that follows
>      '__extension__'.  However, only system header files should use
>      these escape routes; application programs should avoid them.

Agreed, but this:

struct s {
  int i;
};
register struct s *reg asm( "si" );

(note: no double underscores) should issue a diagnostic for violating 7.1.1p2
when invoking

> g++ -std=c++14 -Wall -Wextra -Wpedantic -c reg-asm.cc 

right?  It doesn't.  Total silence.


Leaving off the "asm" part gives

reg-asm.cc:6:20: error: register name not specified for 'reg'
 register struct s *reg;

Reply via email to