Closed Bug 659707 Opened 9 years ago Closed 9 years ago

Add -Wdeclaration-after-statement to CFLAGS

Categories

(Firefox Build System :: General, defect)

x86
macOS
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla7

People

(Reporter: jrmuizel, Assigned: jrmuizel)

References

Details

Attachments

(1 file)

Having this could have helped prevent that backout that happened for bug 658351.
MSVC doesn't like declarations after statements so we should warn on other platforms too.
Attachment #535133 - Flags: review?(khuey)
Comment on attachment 535133 [details] [diff] [review]
Add -Wdeclaration-after-statement to CFLAGS

Is the goal here to warn in gcc so that devs using gcc only don't break MSVC?
Attachment #535133 - Flags: review?(khuey) → review+
(In reply to comment #2)
> Comment on attachment 535133 [details] [diff] [review] [review]
> Add -Wdeclaration-after-statement to CFLAGS
> 
> Is the goal here to warn in gcc so that devs using gcc only don't break MSVC?

Yes.
http://hg.mozilla.org/mozilla-central/rev/b47d5dcdc340
Assignee: nobody → jmuizelaar
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0) Gecko/20100101 Firefox/7.0

Is there any way to verify this on the QA side? I checked in the repo and "Wdeclaration-after-statement" was adeed to CFLAGS:
http://hg.mozilla.org/mozilla-central/file/cc1e08803869/configure.in

Is that enough to mark this as Verified?

Thanks!
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.