Last Comment Bug 659707 - Add -Wdeclaration-after-statement to CFLAGS
: Add -Wdeclaration-after-statement to CFLAGS
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla7
Assigned To: Jeff Muizelaar [:jrmuizel]
:
: Gregory Szorc [:gps]
Mentors:
Depends on: 818611
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-25 11:24 PDT by Jeff Muizelaar [:jrmuizel]
Modified: 2012-12-05 13:27 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Add -Wdeclaration-after-statement to CFLAGS (1.45 KB, patch)
2011-05-25 11:35 PDT, Jeff Muizelaar [:jrmuizel]
khuey: review+
Details | Diff | Splinter Review

Description Jeff Muizelaar [:jrmuizel] 2011-05-25 11:24:45 PDT
Having this could have helped prevent that backout that happened for bug 658351.
Comment 1 Jeff Muizelaar [:jrmuizel] 2011-05-25 11:35:10 PDT
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.
Comment 2 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-05-25 12:04:46 PDT
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?
Comment 3 Jeff Muizelaar [:jrmuizel] 2011-05-25 12:06:17 PDT
(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.
Comment 4 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-05-25 12:06:40 PDT
Ship it!
Comment 5 Jeff Muizelaar [:jrmuizel] 2011-06-21 13:48:44 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/b47d5dcdc340
Comment 6 Matt Brubeck (:mbrubeck) 2011-06-22 10:16:18 PDT
http://hg.mozilla.org/mozilla-central/rev/b47d5dcdc340
Comment 7 Simona B [:simonab ] 2011-08-26 01:12:15 PDT
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!

Note You need to log in before you can comment on or make changes to this bug.