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/25019] Promoting long to long long generates no warning and/or incorrect result.



------- Comment #4 from schwab at suse dot de  2005-11-24 17:28 -------
(In reply to comment #2)
> a=1<<b;
> is done in the type of b and not of type of a

The type of the right operand of a shift expression has no significance at all.
 1 has type int, so has 1<<b.


-- 


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


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