public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jobnoorman at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/48578] New: Range-based for-loops do not compile when -nostdinc is given Date: Tue, 12 Apr 2011 17:14:00 -0000 [thread overview] Message-ID: <bug-48578-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48578 Summary: Range-based for-loops do not compile when -nostdinc is given Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: jobnoorman@gmail.com Created attachment 23965 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23965 Simple file which produces the error When using range-based for-loops when -nostdinc is given, GCC gives an error about 'begin' and 'end' not being declared while they definitely are. I've attached a simple file which produces this error. Here's the output of "g++ -v -save-temps -std=c++0x -nostdinc main.cpp": Using built-in specs. COLLECT_GCC=/usr/local/bin/g++ COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-pc-linux-gnu/4.6.0/lto-wrapper Target: i686-pc-linux-gnu Configured with: ./configure --enable-languages=c,c++ Thread model: posix gcc version 4.6.0 (GCC) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++0x' '-nostdinc' '-shared-libgcc' '-mtune=generic' '-march=pentiumpro' /usr/local/libexec/gcc/i686-pc-linux-gnu/4.6.0/cc1plus -E -quiet -nostdinc -v -D_GNU_SOURCE main.cpp -mtune=generic -march=pentiumpro -std=c++0x -fpch-preprocess -o main.ii #include "..." search starts here: #include <...> search starts here: End of search list. COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++0x' '-nostdinc' '-shared-libgcc' '-mtune=generic' '-march=pentiumpro' /usr/local/libexec/gcc/i686-pc-linux-gnu/4.6.0/cc1plus -fpreprocessed main.ii -quiet -dumpbase main.cpp -mtune=generic -march=pentiumpro -auxbase main -std=c++0x -version -o main.s GNU C++ (GCC) version 4.6.0 (i686-pc-linux-gnu) compiled by GNU C version 4.6.0, GMP version 4.3.2, MPFR version 3.0.0-p8, MPC version 0.9 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU C++ (GCC) version 4.6.0 (i686-pc-linux-gnu) compiled by GNU C version 4.6.0, GMP version 4.3.2, MPFR version 3.0.0-p8, MPC version 0.9 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 07532dd28c9f528a39c397b207537ed2 main.cpp: In function ‘int main()’: main.cpp:11:18: error: ‘begin’ was not declared in this scope main.cpp:11:18: error: ‘end’ was not declared in this scope
next reply other threads:[~2011-04-12 17:14 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-04-12 17:14 jobnoorman at gmail dot com [this message] 2011-04-12 17:39 ` [Bug c++/48578] " redi at gcc dot gnu.org 2011-04-12 18:29 ` jobnoorman at gmail dot com
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-48578-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).