Errors and warnings when building 1.77 trunk

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Errors and warnings when building 1.77 trunk

Post by JensAyton »

The warning is technically correct. The usage is actually safe, but only by an implied API contract¹, and there’s no way to inform the compiler that a particular case is safe.

This makes the -Wmaybe-uninitialized warning pretty useless, but unfortunately it’s implied by -Wall in recent versions of GCC. However, we don’t seem to be using -Wall for Windows builds. In any case, I suggest suppressing the error with -Wno-maybe-uninitialized (or #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" in the affected files).

¹ Specifically, the helpers used by OOJS_RETURN_WITH_HELPER() may never read from jsresult, and must write to it if returning YES.
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: Errors and warnings when building 1.77 trunk

Post by Tricky »

I checked out a fresh copy of trunk and did a few make tests with the new flags for optimization (SSE2). What I found was that -O2 and -Os doesn't show those warnings whereas -O3, -Ofast and -O4 (ObjC only)* does.

* - I wanted to see what -O4 did.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Errors and warnings when building 1.77 trunk

Post by JensAyton »

Yeah, this type of warning requires relatively sophisticated analysis, which isn’t done at low optimization levels.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6634
Joined: Wed Feb 28, 2007 7:54 am

Re: Errors and warnings when building 1.77 trunk

Post by another_commander »

Just for the record, I can confirm that -Ofast does generate the warnings Tricky gets also on my system. I don't know how I managed to miss them when I was building the experimental SSE2 version. Tricky, sorry if I made you donwload/re-install stuff for no good reason.
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: Errors and warnings when building 1.77 trunk

Post by Tricky »

another_commander wrote:
Just for the record, I can confirm that -Ofast does generate the warnings Tricky gets also on my system. I don't know how I managed to miss them when I was building the experimental SSE2 version. Tricky, sorry if I made you donwload/re-install stuff for no good reason.
It's OK. Every so often I do a clean checkout of various projects to make sure my builds are properly up to date.
Post Reply