public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48599] New: [C++0x] no diagnostic for invalid use of auto with array declarator
@ 2011-04-14 1:51 hstong at ca dot ibm.com
2011-04-14 8:09 ` [Bug c++/48599] " redi at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: hstong at ca dot ibm.com @ 2011-04-14 1:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48599
Summary: [C++0x] no diagnostic for invalid use of auto with
array declarator
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hstong@ca.ibm.com
Host: powerpc64-unknown-linux-gnu
Target: powerpc64-unknown-linux-gnu
A program is ill-formed if an array declarator is used to declare an entity
whose type contains the auto type specifier. A diagnostic is expected.
See subclause 8.3.4 [dcl.array] paragraph 1 in the 2011 FDIS.
### Self-contained source (a.cpp):
int v[1];
auto (*p)[1] = &v;
### Command to reproduce:
g++ -std=c++0x -Wall -W -pedantic -c a.cpp -o a.o
### Compiler output:
(No messages; return code 0)
### g++ -v output:
Using built-in specs.
Target: powerpc64-unknown-linux-gnu
Configured with: ../gcc-4.5.0/configure --prefix=/data/gcc
--program-suffix=-4.5.0 --disable-libssp --disable-libgcj
--enable-version-specific-runtime-libs --with-cpu=default32 --enable-secureplt
--with-long-double-128 --enable-shared --enable-__cxa_atexit
--enable-threads=posix --enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.5.0 (GCC)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/48599] [C++0x] no diagnostic for invalid use of auto with array declarator
2011-04-14 1:51 [Bug c++/48599] New: [C++0x] no diagnostic for invalid use of auto with array declarator hstong at ca dot ibm.com
@ 2011-04-14 8:09 ` redi at gcc dot gnu.org
2011-05-25 21:14 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2011-04-14 8:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48599
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.04.14 08:09:40
Ever Confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-14 08:09:40 UTC ---
Confirmed
N.B. there are a lot of improvements to C++0x support in 4.6 relative to 4.5,
it's usually a good idea to check the latest version for C++0x bugs. In this
case the bug is still there.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/48599] [C++0x] no diagnostic for invalid use of auto with array declarator
2011-04-14 1:51 [Bug c++/48599] New: [C++0x] no diagnostic for invalid use of auto with array declarator hstong at ca dot ibm.com
2011-04-14 8:09 ` [Bug c++/48599] " redi at gcc dot gnu.org
@ 2011-05-25 21:14 ` jason at gcc dot gnu.org
2011-05-26 2:23 ` jason at gcc dot gnu.org
2011-05-26 3:11 ` jason at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2011-05-25 21:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48599
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |jason at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/48599] [C++0x] no diagnostic for invalid use of auto with array declarator
2011-04-14 1:51 [Bug c++/48599] New: [C++0x] no diagnostic for invalid use of auto with array declarator hstong at ca dot ibm.com
2011-04-14 8:09 ` [Bug c++/48599] " redi at gcc dot gnu.org
2011-05-25 21:14 ` jason at gcc dot gnu.org
@ 2011-05-26 2:23 ` jason at gcc dot gnu.org
2011-05-26 3:11 ` jason at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2011-05-26 2:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48599
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-26 02:22:56 UTC ---
Author: jason
Date: Thu May 26 02:22:54 2011
New Revision: 174257
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174257
Log:
PR c++/48599
* decl.c (create_array_type_for_decl): Complain about array of auto.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/auto24.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/48599] [C++0x] no diagnostic for invalid use of auto with array declarator
2011-04-14 1:51 [Bug c++/48599] New: [C++0x] no diagnostic for invalid use of auto with array declarator hstong at ca dot ibm.com
` (2 preceding siblings ...)
2011-05-26 2:23 ` jason at gcc dot gnu.org
@ 2011-05-26 3:11 ` jason at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2011-05-26 3:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48599
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.0
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-26 03:09:15 UTC ---
Fixed for 4.7.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-05-26 3:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-14 1:51 [Bug c++/48599] New: [C++0x] no diagnostic for invalid use of auto with array declarator hstong at ca dot ibm.com
2011-04-14 8:09 ` [Bug c++/48599] " redi at gcc dot gnu.org
2011-05-25 21:14 ` jason at gcc dot gnu.org
2011-05-26 2:23 ` jason at gcc dot gnu.org
2011-05-26 3:11 ` jason at gcc dot gnu.org
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).