After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 634225 - Gnome-shell doesn't build with -O3
Gnome-shell doesn't build with -O3
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: building
2.91.x
Other Linux
: Normal normal
: ---
Assigned To: Dan Winship
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-11-07 15:41 UTC by Marc-Antoine Perennou
Modified: 2010-11-20 19:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the build (1.48 KB, patch)
2010-11-07 15:41 UTC, Marc-Antoine Perennou
none Details | Review
StThemeNode: suppress compiler warnings and fix minor bugs (3.69 KB, patch)
2010-11-14 18:43 UTC, Owen Taylor
committed Details | Review

Description Marc-Antoine Perennou 2010-11-07 15:41:41 UTC
Created attachment 173992 [details] [review]
Patch to fix the build

At least using gcc 4.5.1, gnome-shell fails to build because of some variables not being unintialized when compiling with -O3.
Comment 1 Owen Taylor 2010-11-14 18:43:09 UTC
Created attachment 174451 [details] [review]
StThemeNode: suppress compiler warnings and fix minor bugs

Hmm. Not that I would _recommend_ building the shell (or anythign else)
with -O3 but the added initializations seem in line with ones that already
exist for warnings that show up with -O2 so we can add them.

I think it's always good to mark warning-suppression assignments as such,
and I found a couple of bugs in the logic when double-checking that the
warnings you were getting were in fact fake. So here's my attempt at
a patch. (I also added initializations for the weight variables where you
weren't getting a warning for some reason to keep things consistent.)
Comment 2 Dan Winship 2010-11-16 14:38:31 UTC
Comment on attachment 174451 [details] [review]
StThemeNode: suppress compiler warnings and fix minor bugs

The bugfixy parts definitely look right.

The initializations definitely look unnecessary. Some investigation reveals that it's a known bug that gcc can't figure the "foo_set" trick, but maybe it will be fixed in gcc 4.6. (http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00706.html)
Comment 3 Owen Taylor 2010-11-20 19:16:08 UTC
If GCC 4.6 fixes that, that would be a real advance. I've been inserting bogus initializations for this type of pattern forever.

Attachment 174451 [details] pushed as 1fce237 - StThemeNode: suppress compiler warnings and fix minor bugs