4 msgproblem building gcc-4.3 snapshot in home dir

mutex failing (stupid C++!)
\ skaller (31 Oct 2007)
. \ Ian Lance Taylor (31 Oct 2007)
. \ Kaz Kylheku (31 Oct 2007)
. . \ Miles Bader (31 Oct 2007)
. . . \ skaller (1 Nov 2007)

1 msgFwd: g++ source
3 msgdirectory with object files
1 msgBuilding gcc 4.2.1 on mac os x 10.4 with Xcode 2.2
2 msgLD_LIBRARY_PATH
3 msgRe: GNU GCC -m32 Problem?
7 msg64 bit assignment on a 32 bit platform
1 msgRe: Optimization of conditional access to globa...
1 msg4.2.0: Bootstrap comparison failure!
2 msgRe: Would you like to give me advice about how ...
1 msgWir haben etwas gegen Geruch!
1 msgWould you like to help me?
1 msgfail to building with -msoft-float
4 msgquestion on optimization
1 msgRe: GCC4.1.1
1 msgCreating attachment in bugzilla fails
1 msgProblem to compile GCC-4.2.2 as a cross-compiler
3 msgegcs help
4 msgGcc-2.95
Subject:Re: mutex failing (stupid C++!)
Group:Gcc-help
From:Miles Bader
Date:31 Oct 2007


"Kaz Kylheku" <kaz> writes:
> This should be diagnosed by -Wunused, IMHO. You are calling a
> constructor, but ignoring the return value.
...
> into the program, -Wunused will give you a diagnostic. But if you
> construct an object and ignore the result, you don't get a diagnostic.

Of course constructors (and destructors) can have side-effects, and it's
not that uncommon to create objects just for such side-effects. I'm not
sure how common it is to use _unnamed_ objects in this way (I've never
done it I think, and it seems ever so slightly dodgy), but obviously it's
possible...

I guess gcc could warn when there are obviously no side-effects but who
knows how easy that is (and maybe the few cases it catches aren't worth
the effort).

-Miles
--
"Suppose He doesn't give a shit? Suppose there is a God but He
just doesn't give a shit?" [George Carlin]


© 2004-2008 readlist.com