This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
egcs-2.91.25 19980425 : spurious warnings with ostream::operator<< and enum
- To: egcs-bugs at cygnus dot com
- Subject: egcs-2.91.25 19980425 : spurious warnings with ostream::operator<< and enum
- From: Laurent Bonnaud <bonnaud at irisa dot fr>
- Date: 26 Apr 1998 19:31:03 +0200
Hi,
the latest snapshot finds warnings in this program :
#include <iostream>
enum e {e1,e2};
int main()
{
cout<<e1;
}
% g++ -Wall bug7.cc
bug7.cc: In function `int main()':
bug7.cc:7: warning: passing `e' chooses `int' over `unsigned int'
bug7.cc:7: warning: in call to `ostream::operator <<(int)'
bug7.cc:7: warning: passing `e' chooses `int' over `long int'
bug7.cc:7: warning: in call to `ostream::operator <<(int)'
bug7.cc:7: warning: passing `e' chooses `int' over `long unsigned int'
bug7.cc:7: warning: in call to `ostream::operator <<(int)'
bug7.cc:7: warning: passing `e' chooses `int' over `unsigned int'
bug7.cc:7: warning: in call to `ostream::operator <<(int)'
--
Laurent.