Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable /Wall in msc #709

Closed
RicoP opened this issue Mar 9, 2017 · 9 comments · Fixed by #1447
Closed

enable /Wall in msc #709

RicoP opened this issue Mar 9, 2017 · 9 comments · Fixed by #1447

Comments

@RicoP
Copy link

RicoP commented Mar 9, 2017

For my project I would like to crank the warning level up to the maximum with /Wall. it seems like that warnings { "Extra" } only activates warning level 4 and I have to manually bump the warning level in my project properties.

I tried to override the warning level with the command

buildoptions { "/Wall" }

in my project, but it doesn't seem to work.

Are there other ways to set the /Wall flag?

@leeonix
Copy link
Contributor

leeonix commented Mar 9, 2017

I need this too. msdn noted:

/Wall	Displays all warnings displayed by /W4 and all other warnings that /W4 does not include
for example, warnings that are off by default. 
For more information, see Compiler Warnings That Are Off By Default.

/Wall give information more than warning level 4.
@RicoP you can disable warnings and add buildoptions { "/Wall" } it is work.

warnings 'Off'
buildoptions { "/Wall" }

you can test it.

@starkos
Copy link
Member

starkos commented Mar 9, 2017

Can you submit a PR to change the mapping for warnings { "Extra" }? I don't believe /Wall existed at the time that flag was originally implemented.

@leeonix
Copy link
Contributor

leeonix commented Mar 9, 2017

@starkos what reason you don't believe /Wall. I am not using /Wall for a long time. but recently use. so I comment this issue.

@amc522
Copy link
Contributor

amc522 commented Mar 10, 2017

If you do this please do not make the only options /W0 and /Wall. Most projects do not need /Wall. The msvc STL is only tested so that it doesn't emit /W4 errors. The visual c++ team generally recommends that you don't use /Wall all the time. Only occasionally when you need extra checks. I suggest the following options:

  • 'Off' which maps to '/W0'
  • 'Extra' which maps to '/W4'
  • 'All' which maps to '/Wall'

/W4 is similar to gcc's -Wall, and /Wall is similar to gcc's -Wextra.

@amc522
Copy link
Contributor

amc522 commented Mar 10, 2017

Also, theres the /permissive- option in VS2017 which makes the compiler standards conformant, and produces errors for microsoft specific extensions to c++

https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/

@leeonix
Copy link
Contributor

leeonix commented Mar 10, 2017

@amc522 NO, /Wall is not exist in premake5.

@amc522
Copy link
Contributor

amc522 commented Mar 10, 2017

@leeonix I understand that /Wall is currently not in premake 5. I was just saying that if it does get added, please keep /W4 available.

@leeonix
Copy link
Contributor

leeonix commented Mar 10, 2017

@amc522 OK.

@RicoP
Copy link
Author

RicoP commented Mar 11, 2017

@leeonix: thank you. This workaround is working~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants