We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4103 - SDL_cpuinfo.h provokes warnings with -Wundef on non-x86 hosts
Summary: SDL_cpuinfo.h provokes warnings with -Wundef on non-x86 hosts
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: Other Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-05 19:35 UTC by Felix Geyer
Modified: 2018-03-11 05:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Geyer 2018-03-05 19:35:13 UTC
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
Comment 1 Sam Lantinga 2018-03-11 05:20:51 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/a358a111ff69