This is the mail archive of the gcc-bugs@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]

egcs-2.91.25 19980425 : spurious warnings with ostream::operator<< and enum



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.


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