W dniu 02.04.2011 16:17, Jonathan Wakely pisze:
2011/4/2 Tomasz Kamiński:
Hi,
I have same suggestions connected with the set of allowed values for std
flag in gcc for C and C++. According to manual, there are 3 categories of
accepted values: ISO standard reference number (ex. iso9899:1990), common
name (c90) and version with gnu extensions (ex. gnu90) . But for same
standards (amendment C90 and C++) there is only one of them supported. So mu
suggestion is to extend set of possible values to:
c90, iso9899:1990;
gnu90
*c94* or *c95*, iso9899:199409;
*gnu94* or *gnu95* (optionally)
gcc/c-family/c-opts.c says "There is no concept of gnu94."
In this case simply omit this value.
c99, iso9899:1999
gnu99
c1x, *iso9899:201x*
gnu1x
c++98, *iso14882:1998**
*gnu++98
c++0x,*iso14882:200x*
C++0x is not an ISO standard yet, so it's not appropriate to add
iso14882:200x - even when it is a standard it will probably be 2011
not 200x (you might have noticed we missed that date ;-)
The x is hexadecimal number and now it is B (this is the best
explanation I have ever found :-) ). Anyway I have been suggested by the
for C99 aliases present (but deprecated) in gcc-4.4.3: C9x and
iso9899:199x. Also WG14 (C Standard committee) uses this kind of
numeration (ex. http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1539.pdf).
The same applies to c1x.
Consistency is sometimes nice, but personally I don't really see any
benefit to this change.
In my opinion the ability to use consistent set of options for
specifying language standard is more convenient for a developer (user).