Hi Volker, thanks for picking these issues up. I told Manuel I'd
review the rest of the remaining pedwarns, but haven't had time to do
it either.

2008/6/11 Volker Reichelt:
> * Scopes in for-loops:
>
>  void foo()
>  {
>    for (int i=0; i<10; ++i) {}
>    i = 0;
>  }
>
>  warn.cc: In function 'void foo()':
>  warn.cc:4: warning: name lookup of 'i' changed for new ISO 'for' scoping
>  warn.cc:3: warning:   using obsolete binding at 'i'

I suggest making this a permerror and changing the text slightly, see
http://gcc.gnu.org/ml/gcc/2008-01/msg00192.html

> * Declaration with no type:
>
>  foo() {}
>
>  warn.cc:1: warning: ISO C++ forbids declaration of 'foo' with no type

See the part about special handling of 'main' in
http://gcc.gnu.org/ml/gcc/2008-01/msg00189.html


> * Invalid use of 'template':
> * Using 'struct' for a union:

These two can both be fixed by changes in cp/parser.c - all cases of
pedwarn that are not guarded by testing 'pedantic' should be
permerrors.

I'm reviewing the mails linked above, as well as the other cases you
listed. I haven't updated my gcc tree in weeks, so it will take me a
while to bootstrap and test. If you get a patch ready first, please CC
me as I'm not subscribed to gcc-patches.

Thanks,

Jon

Reply via email to