public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56585] New: Cannot introduce a qualified type - Elaborated type specifiers
@ 2013-03-09 23:47 fpelliccioni at gmail dot com
2013-03-10 10:25 ` [Bug c++/56585] " paolo.carlini at oracle dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: fpelliccioni at gmail dot com @ 2013-03-09 23:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56585
Bug #: 56585
Summary: Cannot introduce a qualified type - Elaborated type
specifiers
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: fpelliccioni@gmail.com
I understand that the following code should yield a compiler error.
According to the C++ Standard ( N3485 )
3.4.4 Elaborated type specifiers [basic.lookup.elab]
See example in paragraph 3
Instead, the compiler issues a warning.
// Begin code-----------------
struct Data {};
struct ::Data;
int main () {}
// End code-------------------
Verified on:
4.8.0 (20130204)
4.7.2
4.6.3
Used as follows:
-std=c++11 -Wall -W -pedantic -O2
or
-std=c++0x -Wall -W -pedantic -O2
Thanks and Regards,
Fernando Pelliccioni
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/56585] Cannot introduce a qualified type - Elaborated type specifiers
2013-03-09 23:47 [Bug c++/56585] New: Cannot introduce a qualified type - Elaborated type specifiers fpelliccioni at gmail dot com
@ 2013-03-10 10:25 ` paolo.carlini at oracle dot com
2013-03-10 10:33 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-03-10 10:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56585
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-03-10 10:25:27 UTC ---
For the record, likewise current ICC.
(by the way, you don't need a main in such a testcase, it's a dg-do compile
anyway)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/56585] Cannot introduce a qualified type - Elaborated type specifiers
2013-03-09 23:47 [Bug c++/56585] New: Cannot introduce a qualified type - Elaborated type specifiers fpelliccioni at gmail dot com
2013-03-10 10:25 ` [Bug c++/56585] " paolo.carlini at oracle dot com
@ 2013-03-10 10:33 ` redi at gcc dot gnu.org
2013-03-10 11:22 ` fpelliccioni at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2013-03-10 10:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56585
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-03-10 10:33:45 UTC ---
The standard says nothing about errors, it only requires a diagnostic, and a
warning is a diagnostic.
Maybe it could be an error with -pedantic-errors though.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/56585] Cannot introduce a qualified type - Elaborated type specifiers
2013-03-09 23:47 [Bug c++/56585] New: Cannot introduce a qualified type - Elaborated type specifiers fpelliccioni at gmail dot com
2013-03-10 10:25 ` [Bug c++/56585] " paolo.carlini at oracle dot com
2013-03-10 10:33 ` redi at gcc dot gnu.org
@ 2013-03-10 11:22 ` fpelliccioni at gmail dot com
2013-03-10 12:42 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: fpelliccioni at gmail dot com @ 2013-03-10 11:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56585
--- Comment #3 from Fernando Pelliccioni <fpelliccioni at gmail dot com> 2013-03-10 11:21:59 UTC ---
I don't see anything about "diagnostic", I only see that the Standard says
"error"
I quote a relevant excerpt from the example.
[ Example:
/* ... */
struct Data {
/* ... */
};
/* ... */
struct Data; // OK: Redeclares Data at global scope
struct ::Data; // error: cannot introduce a qualified type (7.1.6.3)
/* ... */
—end example ]
If I'm wrong, please point me to the standard.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/56585] Cannot introduce a qualified type - Elaborated type specifiers
2013-03-09 23:47 [Bug c++/56585] New: Cannot introduce a qualified type - Elaborated type specifiers fpelliccioni at gmail dot com
` (2 preceding siblings ...)
2013-03-10 11:22 ` fpelliccioni at gmail dot com
@ 2013-03-10 12:42 ` redi at gcc dot gnu.org
2013-03-10 17:18 ` fpelliccioni at gmail dot com
2013-03-15 15:50 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2013-03-10 12:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56585
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-03-10 12:41:42 UTC ---
1.3.6 [defns.diagnostic] and 1.4 [intro.compliance] p2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/56585] Cannot introduce a qualified type - Elaborated type specifiers
2013-03-09 23:47 [Bug c++/56585] New: Cannot introduce a qualified type - Elaborated type specifiers fpelliccioni at gmail dot com
` (3 preceding siblings ...)
2013-03-10 12:42 ` redi at gcc dot gnu.org
@ 2013-03-10 17:18 ` fpelliccioni at gmail dot com
2013-03-15 15:50 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: fpelliccioni at gmail dot com @ 2013-03-10 17:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56585
--- Comment #5 from Fernando Pelliccioni <fpelliccioni at gmail dot com> 2013-03-10 17:17:58 UTC ---
Maybe GCC behavior is correct.
I thought, mistakenly, that the examples of the C++ Standard have normative
meaning.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/56585] Cannot introduce a qualified type - Elaborated type specifiers
2013-03-09 23:47 [Bug c++/56585] New: Cannot introduce a qualified type - Elaborated type specifiers fpelliccioni at gmail dot com
` (4 preceding siblings ...)
2013-03-10 17:18 ` fpelliccioni at gmail dot com
@ 2013-03-15 15:50 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-03-15 15:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56585
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-03-15 15:50:14 UTC ---
Closing.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-03-15 15:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-09 23:47 [Bug c++/56585] New: Cannot introduce a qualified type - Elaborated type specifiers fpelliccioni at gmail dot com
2013-03-10 10:25 ` [Bug c++/56585] " paolo.carlini at oracle dot com
2013-03-10 10:33 ` redi at gcc dot gnu.org
2013-03-10 11:22 ` fpelliccioni at gmail dot com
2013-03-10 12:42 ` redi at gcc dot gnu.org
2013-03-10 17:18 ` fpelliccioni at gmail dot com
2013-03-15 15:50 ` paolo.carlini at oracle dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).