rotten egcs causing gas pains
Gerald Pfeifer
pfeifer@dbai.tuwien.ac.at
Sun May 17 17:56:00 GMT 1998
On Mon, 18 May 1998, Cheryl Fillekes wrote:
> 2380: warning: name lookup for `joe' changed for new ANSI `for' scoping
> 2363: warning: using obsolete binding at `joe'
>
> shows up for about 20 little indices on for-loops. It's annoying,
> and it might be responsible for the "Branch out of range" problem.
Actually the message is quite clear: The ANSI/ISO C++ committee decided to
fix a bug in the C++ language specification (Personally I didn't like the
old behaviour already more than 10 years ago! ;-).
Thus, what used to be valid code, now has different semantics. egcs
detects old code and provides a work-around for it.
> I did not write the code I'm trying to compile, and have no desire to
> re-write it. The author blames the compiler. It works fine-- for him
> -- apparently, under egcs 1.0.1 under "Linux" (no variant specified)
> using gas version ??? on a ??? cpu. It also works, for him, on the
> "64-bit SGI's" again, IRIX and compiler rev unspecified.
This should not platform dependent and I'm quite sure that with exactly
the same options you're using also he will get the very same warnings.
Unless there is a real compiler bug, that is, but without seeing the
code in question this is impossible to decide.
> Any suggestions? Thanks.
o Have the original author use the very same options as you.
o Possibly have the original author update to egcs 1.0.3 or a current
snapshot.
o If he gets the same warnings, his code quite surely is not ISO C++
compliant and he should fix it.
o If he doesn't get these warnings or you really believe egcs is in
error, please provide source code (a minimal example, if possible).
Hope this helps,
Gerald
--
Gerald Pfeifer (Jerry) Vienna University of Technology
pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/
More information about the Gcc-bugs
mailing list