public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "krelisnet at softhome dot net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/17109] New: bogus syntax error of c++ 3.4.0 triggered by -O Date: Thu, 19 Aug 2004 16:18:00 -0000 [thread overview] Message-ID: <20040819161838.17109.krelisnet@softhome.net> (raw) The code below results in syntax error when using -O. The syntax error is not mentioned when omitting -O. test.cc: #----------------------------------------------------- #include <string> enum keyword_type {UNKNOWN = -1, TEXT, DATE, NUM}; class keyword { public: keyword () {type = UNKNOWN; } std::string gettext() { return txt; } private: enum keyword_type type; std::string txt; }; #----------------------------------------------------- invocation: g++34 -v -save-temps -c -O test.cc #----------------------------------------------------- message: Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.0/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,java,f77 --host=i386-redhat-linux Thread model: posix gcc version 3.4.0 (Red Hat Linux 3.4.0-1) /usr/libexec/gcc/i386-redhat-linux/3.4.0/cc1plus -E -quiet -v -D_GNU_SOURCE test.cc -O -o test.ii ignoring nonexistent directory "/usr/lib/gcc/i386-redhat-linux/3.4.0/../../../../i386-redhat-linux/include" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/i386-redhat-linux/3.4.0/../../../../include/c++/3.4.0 /usr/lib/gcc/i386-redhat-linux/3.4.0/../../../../include/c++/3.4.0/i386-redhat-linux /usr/lib/gcc/i386-redhat-linux/3.4.0/../../../../include/c++/3.4.0/backward /usr/local/include /usr/lib/gcc/i386-redhat-linux/3.4.0/include /usr/include End of search list. /usr/libexec/gcc/i386-redhat-linux/3.4.0/cc1plus -fpreprocessed test.ii -quiet -dumpbase test.cc -auxbase test -O -version -o test.s GNU C++ version 3.4.0 (Red Hat Linux 3.4.0-1) (i386-redhat-linux) compiled by GNU C version 3.4.0 (Red Hat Linux 3.4.0-1). GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64479 test.cc:9: error: expected `;' before '(' token test.cc:13: error: expected `;' before "private" -- Summary: bogus syntax error of c++ 3.4.0 triggered by -O Product: gcc Version: 3.4.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: krelisnet at softhome dot net CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i386-redhat-linux GCC host triplet: i386-redhat-linux GCC target triplet: i386-redhat-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17109
next reply other threads:[~2004-08-19 16:18 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-08-19 16:18 krelisnet at softhome dot net [this message] 2004-08-19 16:42 ` [Bug c++/17109] " reichelt at gcc dot gnu dot org 2004-08-19 16:52 ` krelisnet at softhome dot net 2004-08-19 18:26 ` pinskia at gcc dot gnu dot org 2004-08-19 19:41 ` bangerth at dealii dot org 2004-08-19 19:41 ` bangerth at dealii dot 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=20040819161838.17109.krelisnet@softhome.net \ --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).