This is the mail archive of the gcc@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: a warning to implement


>>It's not clearly bogus.  It's explicitly allowed in the Standard.

It is a self evident fact that *ALL* warnings are about things that are
allowed in the standard, or instead you would be posting an error message
so the above statement is a rather curious non-sequitur.

What is bogus about int a = a; is that it clearly has no useful meaning.
You try to establish one (turn off warnings), but there is nothing either
in the standard or in any reasonable usage that would suggest this (we
might just as well say that if you put the = sign in column 43 it turns
off warnings).

If anything deserves a warning then

  int a = a;

is in the list, since it has no sensible and useful meaning, and must surely
be a mistake.


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