Is `unsigned int` a simple-type-specifier?

80 views
Skip to first unread message

Alexander

unread,
May 26, 2017, 5:58:58 PM5/26/17
to ISO C++ Standard - Discussion
According to this answer, to a question of mine in SO, an unsigned int is not a simple-type-specifier. My argument is that it must be a simple-type-specifier, otherwise void f(unsigned int); would not be considered a declaration given the C++ grammar. For instance, if unsigned int is not a simple-type-specifier, it's not a type-specifier, not a defining-type-specifier,  not a decl-specifier, not a decl-specifier-seq, not a parameter-declaration, not a parameter-declaration-list, and so an (unsigned int)  would not be a parameters-and-qualifiers. Continuing this way we would conclude that void f(unsigned int); is would not be a declaration, which is clearly incorrect. What am I missing here?

Brian Bi

unread,
May 26, 2017, 6:07:40 PM5/26/17
to std-dis...@isocpp.org
On Fri, May 26, 2017 at 2:58 PM, Alexander <alexandreter...@gmail.com> wrote:
According to this answer, to a question of mine in SO, an unsigned int is not a simple-type-specifier. My argument is that it must be a simple-type-specifier, otherwise void f(unsigned int); would not be considered a declaration given the C++ grammar. For instance, if unsigned int is not a simple-type-specifier, it's not a type-specifier, not a defining-type-specifier,  not a decl-specifier, not a decl-specifier-seq,

unsigned int is a decl-specifier-seq.
 
not a parameter-declaration, not a parameter-declaration-list, and so an (unsigned int)  would not be a parameters-and-qualifiers. Continuing this way we would conclude that void f(unsigned int); is would not be a declaration, which is clearly incorrect. What am I missing here?

--

---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-discussion+unsubscribe@isocpp.org.
To post to this group, send email to std-dis...@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-discussion/.



--
Brian Bi

Alexander

unread,
May 26, 2017, 7:14:42 PM5/26/17
to ISO C++ Standard - Discussion
On Friday, May 26, 2017 at 7:07:40 PM UTC-3, Brian Bi wrote:

unsigned int is a decl-specifier-seq.

Great! Thanks. 
Reply all
Reply to author
Forward
0 new messages