Last Comment Bug 832280 - Disable MSVC warning C4482: nonstandard extension used: enum 'xyz' used in qualified name
: Disable MSVC warning C4482: nonstandard extension used: enum 'xyz' used in qu...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: unspecified
: x86 Windows 7
: -- normal (vote)
: mozilla21
Assigned To: filidautore
:
: Gregory Szorc [:gps]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-18 05:04 PST by filidautore
Modified: 2013-01-20 04:50 PST (History)
3 users (show)
VYV03354: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Disable globally MSVC warning C4482 (1.99 KB, patch)
2013-01-18 05:06 PST, filidautore
ted: review+
Details | Diff | Splinter Review
Disable globally MSVC warning C4482 - v1.1 (2.20 KB, patch)
2013-01-18 06:10 PST, filidautore
filidautore: review+
Details | Diff | Splinter Review

Description filidautore 2013-01-18 05:04:12 PST
It becomes a standard since C++11, and MSVC11 removed the warning.
(See bug 755031 comment 23 and 24)
Comment 1 filidautore 2013-01-18 05:06:00 PST
Created attachment 703869 [details] [diff] [review]
Disable globally MSVC warning C4482
Comment 2 Ted Mielczarek [:ted.mielczarek] 2013-01-18 05:43:59 PST
Comment on attachment 703869 [details] [diff] [review]
Disable globally MSVC warning C4482

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

::: configure.in
@@ +2201,5 @@
>          # MSVC warning C4345 warns of newly conformant behavior as of VS2003.
>          # MSVC warning C4351 warns of newly conformant behavior as of VS2005.
> +        # MSVC warning C4482 warns when an enum value is refered specifing the
> +        # name of the enum itself.  It becomes a standard since C++11, and MSVC11
> +        # removed the warning.

Can you reword this slightly, perhaps "This behavior is allowed in C++11, and the warning has been removed in VS2012."
Comment 3 Ted Mielczarek [:ted.mielczarek] 2013-01-18 05:45:58 PST
If you can upload a patch with that minor rewording, you can add the "checkin-needed" keyword to this bug and we'll get it landed. Thanks for the patch!
Comment 4 filidautore 2013-01-18 06:10:36 PST
Created attachment 703890 [details] [diff] [review]
Disable globally MSVC warning C4482 - v1.1

Updated the comment in the patch as suggested.
Comment 5 filidautore 2013-01-18 08:32:48 PST
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #3)
Thanks to you for fast review :)
Comment 6 Masatoshi Kimura [:emk] 2013-01-19 07:46:11 PST
Thanks for proofing my poor English :)
https://hg.mozilla.org/integration/mozilla-inbound/rev/8472e5898021
Comment 7 Ryan VanderMeulen [:RyanVM] 2013-01-19 21:29:11 PST
https://hg.mozilla.org/mozilla-central/rev/8472e5898021
Comment 8 :Ms2ger (⌚ UTC+1/+2) 2013-01-20 01:26:10 PST
Doing this still causes build errors for people, no?
Comment 9 Masatoshi Kimura [:emk] 2013-01-20 03:21:36 PST
What build errors?
Comment 10 :Ms2ger (⌚ UTC+1/+2) 2013-01-20 03:28:01 PST
jgriffin had a build issue because of a gfxImageFormat:: prefix on mac on Jan 8, but the pastebin is dead already.
Comment 11 Masatoshi Kimura [:emk] 2013-01-20 04:50:04 PST
Obviously this patch will affect only MSVC.
A better fix would be making gfxImageFormat an enum class as dholbert said.

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