c++ >> and signed numbers?

Jerry Quinn jlquinn@optonline.net
Mon Sep 15 02:34:00 GMT 2003


According to the c++ spec, operator >> is implementation-defined as to
what it does with negative numbers.  So, does g++ sign-extend negative
numbers shifted to the right?  Or is it triplet-specific?

I scanned the docs but couldn't find any mention of the answer.

Jerry Quinn



More information about the Libstdc++ mailing list