SDL with clang and -Weverything

Hi,

I’ve been using SDL 2 in a project of mine. I’ve compiled my project using
clang (in C++ mode) using the -Weverything flag. However, since I’ve
installed SDL 2 to my home folder, clang does not consider the headers to
be system headers and spits out hundreds of warnings for inconsequential
things that have nothing to do with my own code. I suggest adding something
like:

#pragma clang system_header

to each of the headers, or something similar to begin_code.h. I think it
would be better than expecting users of SDL to add the -isystem-header
compiler option themselves. What do you guys think?

Can you post a bug to bugzilla for tracking, and include the warning
output? Some of them might be worth fixing… :slight_smile:
http://bugzilla.libsdl.org

Thanks!On Fri, Nov 16, 2012 at 7:57 PM, Robin Kaup <k.robin64 at gmail.com> wrote:

Hi,

I’ve been using SDL 2 in a project of mine. I’ve compiled my project using
clang (in C++ mode) using the -Weverything flag. However, since I’ve
installed SDL 2 to my home folder, clang does not consider the headers to
be system headers and spits out hundreds of warnings for inconsequential
things that have nothing to do with my own code. I suggest adding something
like:

#pragma clang system_header

to each of the headers, or something similar to begin_code.h. I think it
would be better than expecting users of SDL to add the -isystem-header
compiler option themselves. What do you guys think?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

All right, done. It’s not quite hundreds of warnings now that I’ve
suppressed the ones in my own code relating to C++98 compatibility.

http://bugzilla.libsdl.org/show_bug.cgi?id=1646On 17 November 2012 08:54, Sam Lantinga wrote:

Can you post a bug to bugzilla for tracking, and include the warning
output? Some of them might be worth fixing… :slight_smile:
http://bugzilla.libsdl.org

Thanks!

On Fri, Nov 16, 2012 at 7:57 PM, Robin Kaup <@Robin_Kaup> wrote:

Hi,

I’ve been using SDL 2 in a project of mine. I’ve compiled my project
using clang (in C++ mode) using the -Weverything flag. However, since I’ve
installed SDL 2 to my home folder, clang does not consider the headers to
be system headers and spits out hundreds of warnings for inconsequential
things that have nothing to do with my own code. I suggest adding something
like:

#pragma clang system_header

to each of the headers, or something similar to begin_code.h. I think it
would be better than expecting users of SDL to add the -isystem-header
compiler option themselves. What do you guys think?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org