Last Comment Bug 727145 - Pass -Wno-return-type-c-linkage to clang
: Pass -Wno-return-type-c-linkage to clang
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla13
Assigned To: Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
:
: Gregory Szorc [:gps]
Mentors:
Depends on:
Blocks: clang
  Show dependency treegraph
 
Reported: 2012-02-14 10:31 PST by Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
Modified: 2012-02-28 10:35 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Pass -Wno-return-type-c-linkage to clang (3.12 KB, patch)
2012-02-14 10:31 PST, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
no flags Details | Diff | Splinter Review
Pass -Wno-return-type-c-linkage to clang (2.96 KB, patch)
2012-02-15 12:27 PST, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
mh+mozilla: review+
Details | Diff | Splinter Review

Description Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-02-14 10:31:47 PST
Created attachment 597080 [details] [diff] [review]
Pass -Wno-return-type-c-linkage to clang

I am normally in favour of fixing warnings by changing the code or changing the compiler, but  clang's return-type-c-linkage is the complete oposite of what we do with jsval, so it is probably better to just disable it.
Comment 1 Gregory Szorc [:gps] 2012-02-15 11:30:40 PST
I ran into this today on Linux using a build pulled after r150418.

Looks like an unwanted change to build/macosx/common snuck into the patch up for review.
Comment 2 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-02-15 12:27:23 PST
Created attachment 597521 [details] [diff] [review]
Pass -Wno-return-type-c-linkage to clang

now without the bits in build/macosx/common.
Comment 3 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-02-16 06:55:39 PST
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=2046a1f46d40
Comment 4 Ed Morley [:emorley] 2012-02-17 05:33:53 PST
https://hg.mozilla.org/mozilla-central/rev/2046a1f46d40
Comment 5 :Irving Reid (No longer working on Firefox) 2012-02-28 10:21:23 PST
This change causes Xcode 4.0.2 (Mac OS X 10.6) to print many

warning: unknown warning option '-Wno-return-type-c-linkage' [-Wunknown-warning-option]


ireid% clang --version
Apple clang version 2.0 (tags/Apple/clang-139) (based on LLVM 2.9svn)
Target: x86_64-apple-darwin10
Thread model: posix
Comment 6 Gregory Szorc [:gps] 2012-02-28 10:35:01 PST
(In reply to Irving Reid (:irving) from comment #5)
> This change causes Xcode 4.0.2 (Mac OS X 10.6) to print many
> 
> warning: unknown warning option '-Wno-return-type-c-linkage'
> [-Wunknown-warning-option]

That's because Clang added the new warning only a few weeks ago in the not-yet-released 3.1 release.

Perhaps we could add -Wno-unknown-warning-option to the default Clang compiler flags...

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