Skip to content

Conversation

@khwilliamson
Copy link
Contributor

@khwilliamson khwilliamson commented Oct 13, 2025

It is undefined behavior in C for a symbol name to begin with an
underscore followed by a capital letter or a second underscore. It's a simple matter to move
the underscore to the end

  • This set of changes does not require a perldelta entry.

@khwilliamson khwilliamson changed the title fakesdio.h: Use legal macro name fakesdio.h, utf8.h : Use legal macro name Oct 13, 2025
It is undefined behavior in C for a symbol name to begin with an
underscore followed by a capital letter.  It's a simple matter to move
the underscore to the end
It is undefined behavior in C for a symbol name to begin with an
underscore followed by a second underscore.

It is a simple matter to change the name to have a single trailing
underscore.
@khwilliamson khwilliamson merged commit 3adffae into Perl:blead Oct 14, 2025
33 checks passed
@khwilliamson khwilliamson deleted the rm_leading branch October 14, 2025 16:52
@ericherman
Copy link
Contributor

Thank you very much for this change.

I'm not sure that it's best described as undefined behaivour, but rather is non-conforming code because it is using section 7.1.3 Reserved identifiers ; regardless, very glad to see this change.

Also, Now that you point this out, we should look at typedefs that end in _t, too ....

@khwilliamson
Copy link
Contributor Author

I don't know what the problem is with elements ending in _t Please explain

@mauke
Copy link
Contributor

mauke commented Oct 19, 2025

POSIX reserves names ending in _t in any header: https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html#tag_16_02_02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants