This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [C++] deprecate overload resolution extension?
- To: <gcc at gcc dot gnu dot org>
- Subject: Re: [C++] deprecate overload resolution extension?
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Tue, 27 Feb 2001 12:43:32 +0000 (GMT)
On 27 Feb 2001, Gabriel Dos Reis wrote:
> Deprecated on branch and removed from mainline.
While candidates for deprecation are being proposed: I wondered about
deprecating, in C, the old GNU style of designated initializers
(fieldname:value and [index]value rather than .fieldname=value and
[index]=value) (by making the associated pedwarns mandatory). This
however is because, given the standard C99 syntax, these extensions (which
are less flexible than the C99 syntax) merely serve to encourage
gratuitous nonportability, rather than because they cause problems for the
compiler. The ONEWS file notes for GCC 2.5 that
* The C syntax for specifying which structure field comes next in an
initializer is now `.FIELDNAME='. The corresponding syntax for
array initializers is now `[INDEX]='. For example,
char whitespace[256]
= { [' '] = 1, ['\t'] = 1, ['\n'] = 1 };
This was changed to accord with the syntax proposed by the Numerical
C Extensions Group (NCEG).
without even mentioning that the old syntax was still available, but the
main GCC manual didn't reflect a preference for the new syntax until
recently (and glibc and the Linux kernel widely use the old syntax).
--
Joseph S. Myers
jsm28@cam.ac.uk