This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran, OOP] PR 46313: OOP-ABI issue, ALLOCATE issue, CLASS renaming issue

On 2010-11-07 16:49, Janus Weil wrote:
Btw, what is the reason for the macro adding *two* underscores in
front, instead of just one?

I got curious and did some googling. Tthe C standard has this: 7.1.3 Reserved identifiers

Each header declares or defines all identifiers listed in its associated subclause, and optionally declares or defines identifiers listed in its associated future library directions subclause and identifiers which are always reserved either for any use or for use as file scope identifiers.

* All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use.

So if the compiler can't use a character the user can't put into identifiers ('.' or '$'), it reverts to something that isn't allowed to put into identifiers: two underscores in the beginning. I think the lesson for us is: '.' and '$' aren't portable.

- Tobi

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]