Add -Wdeclaration-after-statement to CFLAGS

RESOLVED FIXED in mozilla7

Status

()

Core
Build Config
RESOLVED FIXED
6 years ago
4 years ago

People

(Reporter: jrmuizel, Assigned: jrmuizel)

Tracking

unspecified
mozilla7
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Having this could have helped prevent that backout that happened for bug 658351.
(Assignee)

Comment 1

6 years ago
Created attachment 535133 [details] [diff] [review]
Add -Wdeclaration-after-statement to CFLAGS

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+
(Assignee)

Comment 3

6 years ago
(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.
Ship it!
(Assignee)

Comment 5

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/b47d5dcdc340
http://hg.mozilla.org/mozilla-central/rev/b47d5dcdc340
Assignee: nobody → jmuizelaar
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla7

Comment 7

6 years ago
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!
Depends on: 818611
You need to log in before you can comment on or make changes to this bug.