Opened 3 years ago

Closed 3 years ago

#62792 closed defect (wontfix)

legacy-support: rename identifiers that start with underscore

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: cjones051073 (Chris Jones)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc:
Port: legacy-support

Description

legacy support uses defines such as:

#if  __MP_LEGACY_SUPPORT_UTIMENSAT__

It is not legal to define identifiers beginning with double underscore, and defining identifiers beginning with a single underscore seems bad too.

https://stackoverflow.com/questions/25090635/use-and-in-c-programs#answer-25090719

  • All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use.
  • All identifiers that begin with an underscore are always reserved for use as identifiers with file scope in both the ordinary and tag name spaces.

Change History (4)

comment:1 Changed 3 years ago by jmroot (Joshua Root)

The reason these identifiers are reserved is so the standard library can use them without fear of introducing name collisions in programs. Given how legacysupport works, it is in the same position as the standard library in this respect, and could be considered an (unofficial) part of it.

comment:2 Changed 3 years ago by cjones051073 (Chris Jones)

We also went out of our way to make them long winded names such that I really doubt there is ever going to be a clash..

Last edited 3 years ago by cjones051073 (Chris Jones) (previous) (diff)

comment:3 Changed 3 years ago by kencu (Ken)

Cc: kencu removed

comment:4 Changed 3 years ago by cjones051073 (Chris Jones)

Resolution: wontfix
Status: assignedclosed

I have no plans to change these at this point.

Note: See TracTickets for help on using tickets.