public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "p.micolet at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/59005] New: Having designated inits in C++ with -std=c++11 does not cause any errors Date: Tue, 05 Nov 2013 13:52:00 -0000 [thread overview] Message-ID: <bug-59005-4@http.gcc.gnu.org/bugzilla/> (raw) 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
next reply other threads:[~2013-11-05 13:52 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-11-05 13:52 p.micolet at gmail dot com [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-59005-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).