public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59005] New: Having designated inits in C++ with -std=c++11 does not cause any errors
@ 2013-11-05 13:52 p.micolet at gmail dot com
2013-11-05 13:59 ` [Bug c++/59005] " redi at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: p.micolet at gmail dot com @ 2013-11-05 13:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59005
Bug ID: 59005
Summary: Having designated inits in C++ with -std=c++11 does
not cause any errors
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: p.micolet at gmail dot com
This piece of code:
#include <iostream>
using namespace std;
int main(int argc, char** argv)
{
int test[2][2] ={
[0]={1,2},
[1]={3,4},
};
for (int x = 0; x<2;x++)
{
for (int y = 0; y<2; y++)
{
cout << test[x][y] << endl;
}
}
return 0;
}
will compile and execute fine when running:
g++ -Wall -std=c++11 -pedantic test.cpp
No errors or warnings are shown, even if designated initializers are not
supported in the C++11 standard.
Using: GCC 4.8.1
Target: x86_64-suse-linux
Flags: -Wall -std=c++11 -pedantic
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/59005] Having designated inits in C++ with -std=c++11 does not cause any errors
2013-11-05 13:52 [Bug c++/59005] New: Having designated inits in C++ with -std=c++11 does not cause any errors p.micolet at gmail dot com
@ 2013-11-05 13:59 ` redi at gcc dot gnu.org
2013-11-05 22:40 ` daniel.kruegler at googlemail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2013-11-05 13:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59005
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-11-05
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/59005] Having designated inits in C++ with -std=c++11 does not cause any errors
2013-11-05 13:52 [Bug c++/59005] New: Having designated inits in C++ with -std=c++11 does not cause any errors p.micolet at gmail dot com
2013-11-05 13:59 ` [Bug c++/59005] " redi at gcc dot gnu.org
@ 2013-11-05 22:40 ` daniel.kruegler at googlemail dot com
2013-11-05 22:49 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2013-11-05 22:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59005
Daniel Krügler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler@googlemail.
| |com
--- Comment #2 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
According to my knowledge this support is a gcc extension
>From gcc-bugs-return-433674-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Nov 05 22:46:49 2013
Return-Path: <gcc-bugs-return-433674-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 8538 invoked by alias); 5 Nov 2013 22:46:49 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 7871 invoked by uid 55); 5 Nov 2013 22:44:45 -0000
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/58989] [Regression] internal compiler error when using reshape function
Date: Tue, 05 Nov 2013 22:46:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: kargl at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-58989-4-rt61VS1e79@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58989-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58989-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg00451.txt.bz2
Content-length: 737
http://gcc.gnu.org/bugzilla/show_bug.cgi?idX989
--- Comment #4 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Tue Nov 5 22:44:42 2013
New Revision: 204425
URL: http://gcc.gnu.org/viewcvs?rev 4425&root=gcc&view=rev
Log:
2013-11-05 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/58989
* check.c (gfc_check_reshape): ensure that shape is a constant
expression.
2013-11-05 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/58989
* gfortran.dg/reshape_6.f90: New test.
Added:
branches/gcc-4_8-branch/gcc/testsuite/gfortran.dg/reshape_6.f90
Modified:
branches/gcc-4_8-branch/gcc/fortran/ChangeLog
branches/gcc-4_8-branch/gcc/fortran/check.c
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/59005] Having designated inits in C++ with -std=c++11 does not cause any errors
2013-11-05 13:52 [Bug c++/59005] New: Having designated inits in C++ with -std=c++11 does not cause any errors p.micolet at gmail dot com
2013-11-05 13:59 ` [Bug c++/59005] " redi at gcc dot gnu.org
2013-11-05 22:40 ` daniel.kruegler at googlemail dot com
@ 2013-11-05 22:49 ` redi at gcc dot gnu.org
2013-11-05 23:02 ` p.micolet at gmail dot com
2013-11-05 23:20 ` redi at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2013-11-05 22:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59005
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, but that means it should be possible to get a diagnostic with -pedantic
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/59005] Having designated inits in C++ with -std=c++11 does not cause any errors
2013-11-05 13:52 [Bug c++/59005] New: Having designated inits in C++ with -std=c++11 does not cause any errors p.micolet at gmail dot com
` (2 preceding siblings ...)
2013-11-05 22:49 ` redi at gcc dot gnu.org
@ 2013-11-05 23:02 ` p.micolet at gmail dot com
2013-11-05 23:20 ` redi at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: p.micolet at gmail dot com @ 2013-11-05 23:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59005
--- Comment #4 from p.micolet at gmail dot com ---
Hi Daniel, I think it's a gcc extension, but it's not part of the C++11
standard, so surely adding the -std=c++11 should cause this code to not compile
or am I misunderstanding something ?
Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/59005] Having designated inits in C++ with -std=c++11 does not cause any errors
2013-11-05 13:52 [Bug c++/59005] New: Having designated inits in C++ with -std=c++11 does not cause any errors p.micolet at gmail dot com
` (3 preceding siblings ...)
2013-11-05 23:02 ` p.micolet at gmail dot com
@ 2013-11-05 23:20 ` redi at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2013-11-05 23:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59005
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
To get diagnostics for GNU extensions you need to use -pedantic, NOT
-std=c++11, see the manual.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-11-05 23:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-05 13:52 [Bug c++/59005] New: Having designated inits in C++ with -std=c++11 does not cause any errors p.micolet at gmail dot com
2013-11-05 13:59 ` [Bug c++/59005] " redi at gcc dot gnu.org
2013-11-05 22:40 ` daniel.kruegler at googlemail dot com
2013-11-05 22:49 ` redi at gcc dot gnu.org
2013-11-05 23:02 ` p.micolet at gmail dot com
2013-11-05 23:20 ` redi 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).