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

SDL_cpuinfo.h provokes warnings with -Wundef on non-x86 hosts #2845

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

SDL_cpuinfo.h provokes warnings with -Wundef on non-x86 hosts #2845

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: HG 2.0
Reported for operating system, platform: Linux, Other

Comments on the original bug report:

On 2018-03-05 19:35:13 +0000, Felix Geyer wrote:

Forwarding from https://bugs.debian.org/892087 quoting verbatim:

The SDL2 header SDL_cpuinfo.h generates gcc warnings if the program using
it compiles with the -Wundef warning. (In particular, this means that QEMU
builds using it fail on at least sparc hosts, since QEMU dev builds
use both -Wundef and -Werror.).

/usr/include/SDL2/SDL_cpuinfo.h:63:5: warning: "HAVE_IMMINTRIN_H" is not defined, evaluates to 0 [-Wundef]
#if HAVE_IMMINTRIN_H && !defined(SDL_DISABLE_IMMINTRIN_H)

This probably only causes problems on non-x86 hosts, because on x86
hosts SDL_config.h will do "#define HAVE_IMMINTRIN_H 1".

It would be nice if the headers could be compiled cleanly with this
warning flag enabled.

thanks
-- PMM

On 2018-03-11 05:20:51 +0000, Sam Lantinga wrote:

Fixed, thanks!
https://hg.libsdl.org/SDL/rev/a358a111ff69

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

No branches or pull requests

1 participant