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]
Other format: [Raw text]

[Bug c++/15330] inconsistent slicing on cast of int to enum


------- Additional Comments From bangerth at dealii dot org  2004-05-06 21:54 -------
No, the change was fully intentional. 
 
Possible optimizations involve applying bitmasks. For example, 
  enum E { a=0x100 }; 
  E foo (); 
 
  int bar () { 
    return foo() & 0x200; 
  } 
can clearly be optimized away. If gcc isn't already doing such things, 
then it will very likely do in the future. 
 
W. 
   

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15330


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