• Forum
  • Lounge
  • Is not specifying signed/unsigned portab

 
Is not specifying signed/unsigned portable?

I noticed that some compilers treat "int" as unsigned instead of signed, and that most have it as an option. Is code portable if you don't specify signed or unsigned?
Interesting. Well it's good to remember compiler writers can choose how "standard" they want to be. (See Visual Studio C++).

Still... some compilers? Which ones, please be more specific.
Yes, code is portable if you don't specify signed, because signed is the default by the Standards. However, it is true that many compilers let you play with that at compile time -- even modern ones. I don't know why, though... probably to quiet the hysterical raisins in there.
Thanks Duoas. I already knew that the compiler I'm having to use definitely is not standard compliant.

Catfish: Ever programmed robots? You'll find yourself having to use the most obscure compilers...
Topic archived. No new replies allowed.