New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[library.headers],[cstdint.syn.2], [cstdint.syn.2] is not in line with intention. Also fixes #3521 #3528
[library.headers],[cstdint.syn.2], [cstdint.syn.2] is not in line with intention. Also fixes #3521 #3528
Conversation
See discussion in #3521. We might want a general statement instead of a point fix. |
I believe what I did is general statement. I added general note saying, that if there are corresponding typedefs in the header.h they need to be the same. This is regarding all cname vs name.h headers. The normative text is already in place for that: http://eel.is/c++draft/headers#5
plus I removed the potentially misleading bullet from cstdint. |
Ok, then please change the commit message accordingly. Currently, it reads as-if you'd only change [cstdint.syn]. |
For actual types, we have [extern.types]. I'm not seeing in the text that you quoted that types designated by typedefs must be the same. Consider:
Arguably, the presence or absence of implementation-reserved symbols should not make a difference for "same contents", and the two typedefs for uint32_t are token-for-token identical, yet we want such an implementation to be non-conforming. Where do we currently say that, normatively? |
As to my understanding
doesn't mean, that only specified typedefs definitions needs to be the same. Whole header files content needs to be the same. So I think, that
will break the
because, the content will be different with how __my_int is defined. Standard allows differences only in where the names are defined (in namespace Is my understanding wrong? |
So, my devil implementation has:
cname header:
name.h header:
It seems plausible to read "contents is the same" as being satisfied here. After all, we have [basic.def.odr] if we want to say "same tokens and same meaning", and we're obviously not doing this here. |
:) You are right. Now I see your point. The note should be normative text in fact. I will change that! |
... and adding normative text is usually not editorial, but (here) LWG matter. Let's ask around whether we can squint the right way in this case. |
According to the discussion in #3521 it's editorial : should I ask more people about that? Maybe on the reflectors? |
I don't know what that means. The whole problem with the current wording is that "the same" is imprecise, and effectively meaningless. And if I've interpreted you correctly, you're wrong. This should be a conforming implementation:
I don't think anybody would reasonably argue that the "whole header file content" is "the same". That's why I want to change the wording to be precise, and say that the typedefs specified in the standard denote the same types. That doesn't prevent implementations adding other declarations to the
That's certainly the intention, but if it's not clear then let's open an LWG issue. |
@jwakely can you confirm then, that the introduced change fixes that issue and it's editorial? |
I don't get to decide what is and isn't editorial. Removing the whole paragraph also removes the wording about the macros. The new paragraph you're adding doesn't say anything about macros. |
can I please ask for further guidance? Shall I:
|
I suggest an LWG issue. https://cplusplus.github.io/LWG/lwg-active.html#submit_issue |
The editorial group will get together in Prague. We can decide there. |
It's just come to my attention that http://wg21.link/extern.types already requires |
Editorial meeting: C standard library headers are a different thing than C++ library headers, even if they have notionally the same name. The specification is incorporating the definition of the C std library headers into the definition of the C++ <cblah> header. |
this is a fix for issue #3521