Extended identifiers?

R

Rui Maciel

In the current standard for the C programming language, in the section
listing the major changes which have been introduced there is a reference to
"extended identifiers". A brief search on the subject failed to return any
meaningful result, and it appears that this feature isn't currently
implemented in some compilers, such as GCC.

So, does anyone knows what are extended identifiers, and what's their
purpose?


Thanks in advance,
Rui Maciel
 
B

Ben Bacarisse

Rui Maciel said:
In the current standard for the C programming language, in the section
listing the major changes which have been introduced there is a reference to
"extended identifiers". A brief search on the subject failed to return any
meaningful result, and it appears that this feature isn't currently
implemented in some compilers, such as GCC.

My gcc (4.6.3) has -fextended-identifiers which is described as
experimental.
So, does anyone knows what are extended identifiers, and what's their
purpose?

If you need to link to a function called "sys$output" you can't write

extern void sys$output(void);

but you can write

extern void sys\u0024output(void);

The \u and \U syntax are called universal character names. They are not
uncommon in strings and character constants, but they can also appear in
identifiers.

6.4.2.1 p3 (of C99) also says that multi-byte encodings may also be
accepted with some implementation-defined mapping to universal character
names.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top