Skip to content
This repository has been archived by the owner on Dec 3, 2022. It is now read-only.

MinGW Complains About Unknown Pragma #22

Open
k6l2 opened this issue Dec 1, 2014 · 5 comments
Open

MinGW Complains About Unknown Pragma #22

k6l2 opened this issue Dec 1, 2014 · 5 comments

Comments

@k6l2
Copy link

k6l2 commented Dec 1, 2014

My only complaint so far.

Get rid of this:

pragma warning ( disable : 4244 )

I don't know what crappy compiler you're using cough_VS_cough, but why would I even want to disable warnings anyway? At least make it so this pragma is only active on that crappy compiler.

Great job otherwise, keep up the good work!

@ViteFalcon
Copy link

You may want to cough alteast 4 more times to cover 2 more compilers (GCC[1] and Clang[2]), since they all support disabling warnings and have issues of their own that may be crappy for others.

Joke aside, AFAIK warnings were disabled mainly due to third party libs like Boost that get implicitly or explicitly included and have type 'mismatches' that the VS compilers warn about. Like int variable being assigned from size_t variable [3]. A simple case of code in point int strLength = myStdString.length() or a for-loop that uses an int variable to iterate but compares termination condition against a size_t value.

You said, "At least make it so this pragma is only active on that crappy compiler.". Well, so could you. How about submitting a patch?

[1] http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html
[2] http://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas
[3] http://msdn.microsoft.com/en-us/library/th7a07tz.aspx

@betajaen
Copy link
Owner

betajaen commented Dec 2, 2014

I agree, if your concerned about it so much - then do a patch, or better still - find and fix the code that causes the warning, then we can remove it completely.

@k6l2
Copy link
Author

k6l2 commented Dec 2, 2014

Hohoho, touché. I am glad I at least sparked some conversation and an educational compiler post. I use MinGW myself as of late, and honestly it was a very minor annoyance nothing more. Once that pragma is commented out I get no further disturbances from the command line. Once again, very much enjoying my experience with Gorilla so far. Also on an unrelated note, I'm just getting over a cold that's lasted since late October, so I think I've coughed enough in recent days.. ;)

@k6l2 k6l2 closed this as completed Dec 2, 2014
@betajaen betajaen reopened this Dec 2, 2014
@betajaen
Copy link
Owner

betajaen commented Dec 2, 2014

I think both ViteFalcon and I aren't commenting about we should have a patch to change the warning per compiler, but solve the issue itself why the warning is there in the first place. If we change the code that the warning has an issue about, then it's no longer needed, and solves all the problems with all the compilers.

In short, treat the disease not the symptoms. :)

@ViteFalcon
Copy link

I concur.

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

No branches or pull requests

3 participants