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

GCC throws error on SDL_FORCE_INLINE when compiling with -ansi #1092

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

GCC throws error on SDL_FORCE_INLINE when compiling with -ansi #1092

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

SDLBugzilla commented Feb 10, 2021

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 2.0.0
Reported for operating system, platform: Linux, x86_64

Comments on the original bug report:

On 2013-09-29 20:08:46 +0000, Jānis Rūcis wrote:

As per summary, the SDL_FORCE_INLINE macro definition causes a hard error when compiling against the ANSI C standard (GCC -ansi flag).

Here's my test case:

#include <SDL.h>

int main(int argc, char *argv[])
{
return 0;
}

gcc -ansi sdl2-test.c $(sdl2-config --cflags --libs)
In file included from /usr/include/SDL2/SDL_main.h:25:0,
from /usr/include/SDL2/SDL.h:65,
from sdl2-test.c:1:
/usr/include/SDL2/SDL_stdinc.h:258:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘void’
SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t dwords)
^

On 2013-10-01 05:36:03 +0000, Sam Lantinga wrote:

Fixed, thanks!
http://hg.libsdl.org/SDL/rev/4434498bf4b9

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