Closed Bug 1203005 Opened 4 years ago Closed 4 years ago

Remove all traces of -Wdeclaration-after-statement

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(firefox43 fixed)

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: njn, Assigned: njn)

Details

Attachments

(1 file, 1 obsolete file)

Even though we compile C code as C99, we use -Wdeclaration-after-statement because MSVC didn't allow declarations after statements for a long time.

However, Visual Studio 2013 added support [1], so we can now merrily mix declarations and statements everywhere. Hooray.

[1] http://stackoverflow.com/questions/9610747/which-c99-features-are-available-in-the-ms-visual-studio-compiler
The only warnings here related to mixed declarations and statements, and thanks
to part 1 they're no longer a problem.
Attachment #8658555 - Flags: review?(jmuizelaar)
Comment on attachment 8658554 [details] [diff] [review]
(part 1) - Remove all traces of -Wdeclaration-after-statement

Review of attachment 8658554 [details] [diff] [review]:
-----------------------------------------------------------------

It would be worth mentioning in the commit message that this was there so that GCC/clang barf on what MSVC used to not support, but now supports since 2013.
Attachment #8658554 - Flags: review?(mh+mozilla) → review+
(In reply to Mike Hommey [:glandium] from comment #3)
> It would be worth mentioning in the commit message that this was there so
> that GCC/clang barf on what MSVC used to not support, but now supports since
> 2013.

In fact, comment 0 would be good to copy/paste in the commit message.
Comment on attachment 8658555 [details] [diff] [review]
(part 2) - Remove ALLOW_COMPILER_WARNINGS=True from gfx/qcms/

Review of attachment 8658555 [details] [diff] [review]:
-----------------------------------------------------------------

Try server tells me there are other warnings that need fixing in gfx/qcms. So I'll do that in a separate bug.
Attachment #8658555 - Flags: review?(jmuizelaar)
Attachment #8658555 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/1221862c6412
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.