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
[dcl.init] should this 'declarator' be the 'initializer'8 #1615
Comments
I suppose a "declarator" (English) isn't the same as a "declarator" (grammar production). The former is more general. Although [dcl.dcl]p4 seems to use the term in the narrow sense. |
@tkoeppe, I believe you're confused here. |
[dcl.decl] p1 clearly distinguishes "declarator" and "initializer", and I fail to see a use of an English-level "declarator" anywhere. (Some of these words are not \grammarterm'ed, but probably should be.) The note in [dcl.decl] p3 muddies the waters a bit, though. Back to the original issue: I think this should be "An init-declarator can specify an initial value ..." In this context, an initializer always specifies an initial value, so it doesn't fit the "can" in the sentence. |
I don't think #1616 is a proper fix for this issue and proposed #1617.
I think "can" here means an initializer is capable of specifying an initial value, and it "can" be used to do that or not, since it is optional (for a declarator). |
Hi, I got confused when reading [dcl.init]
Should it be like
An initializer can specify an initial value for the identifier being declared.
Noticed that the BNF reflecting the relationship between a declarator and an initializer,
FYI, @sdutoit, thanks!
The text was updated successfully, but these errors were encountered: