Spurious warnings when gcse is active.
Klaus-Georg Adams
Klaus-Georg.Adams@chemie.uni-karlsruhe.de
Fri Jun 12 05:19:00 GMT 1998
Hi Jeff,
The attached file produces spuriuos warnings which seem to indicate an
error somewhere in gcse.
The minimal set of flags to produce them is
g++ -Wall -O -fgcse -frerun-loop-opt
They vanish if you change the program slightly (e.g. leave out the
enum, or replace "foo" by foo(), or leave out one of the lines... Very
strange). I have tried to boil this down as much as possible.
kga
--
-------------------------------------------------------------------------
Klaus-Georg Adams Email: Klaus-Georg.Adams@chemie.uni-karlsruhe.de
Institut f. Anorg. Chemie, Lehrstuhl II Tel: 49(0)721 608 3485
Universität Karlsruhe, D-76128 Karlsruhe
-------------------------------------------------------------------------
#include <string>
string foo();
struct a {
void bar();
enum b { c, d };
b theb;
string baz;
};
void
a::bar()
{
baz += foo() + foo();
baz += foo() + foo() + "foo";
}
More information about the Gcc-bugs
mailing list