RFC: designated initializer vs. long long for i386 assembler

H. J. Lu hjl@lucon.org
Mon Feb 12 16:09:00 GMT 2007


I need to add more bits to

unsigned int opcode_modifier;

in template in i386 assembler. I am running out of bits. I have
2 choices, changing it to long long or struct of bitfields.  long
long isn't a long term solution since we may run out of bits again
in the future. However, it is very unconvenient since we need to
selectively initialize many many entries in i386.h and it is very
easy to get it wrong. C99 has designated initializer, which is
very easy to use it to initialize those entires in i386.h correctly.

Should I use long long or check/use designated initializer? If I
use designated initializer, configure will stop if compilers don't
support designated initializer. Does anyone know when gcc started
support C99 designated initializer? I know gcc 3.2.3 in RHEL3
supports it.


H.J.



More information about the Binutils mailing list