16 bit - Can I make gcc treat an 'int' as 16 bits on an x86 platform? -


i developing code proprietary architecture. development environment consists of half-ported gcc 4.3 available windows, , primitive ide. because of this, develop on linux primary environment, using newer gcc nicer warnings.

however, maximize number of relevant warnings gcc work 16-bit ints while still being able run on native x86 platform. can think of 3 ways of doing this, in order of preference:

  1. a flag makes 'int' 16-bit integer. far have not found any. -m16 not seem it, maybe 1 of architecture options it.

  2. a flag turns on warnings things might problem if int 16 bits, if int 32 or 64 bits in actual code. can happen due integer promotions , hard see @ glance. compiler warnings helpful here.

  3. a compiler flag when building gcc. build custom x86 version of gcc, treats 'int' 16 bits. there such option?


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

php - Cannot override Laravel Spark authentication with own implementation -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -