F
Fred the Freshwater Catfish
Hey guys,
I've been writing some code that I would prefer to be maximally
portable. As I have mostly used Linux, gcc is pretty much the only C
compiler I've ever used under UN*X. I'd like to use non-constant
initializers for some global variables. I'm pretty sure I can get it
to work the way I want under gcc, but what of other compilers? The
gcc documentation in info format says that ISO C99 allows this, and so
I expect some compilers built in the 90's will support the feature,
but to what extent is this true?
What I mean to learn is the general prevalence of this C feature. If
there's no support for certain well-known platforms (maybe SunOS or
OSF/1, whatever) I may consider a different solution to the original
problem, but I'd like to know what I'm getting in to before I start
trying to read the docs for every bloody C compiler that ever hit the
'net in the last twenty years.
Thanks if you can shed any light on this subject.
Fred the Freshwater Catfish
I've been writing some code that I would prefer to be maximally
portable. As I have mostly used Linux, gcc is pretty much the only C
compiler I've ever used under UN*X. I'd like to use non-constant
initializers for some global variables. I'm pretty sure I can get it
to work the way I want under gcc, but what of other compilers? The
gcc documentation in info format says that ISO C99 allows this, and so
I expect some compilers built in the 90's will support the feature,
but to what extent is this true?
What I mean to learn is the general prevalence of this C feature. If
there's no support for certain well-known platforms (maybe SunOS or
OSF/1, whatever) I may consider a different solution to the original
problem, but I'd like to know what I'm getting in to before I start
trying to read the docs for every bloody C compiler that ever hit the
'net in the last twenty years.
Thanks if you can shed any light on this subject.
Fred the Freshwater Catfish