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

Usage of non C99 features #26

Open
KlemenPl opened this issue Apr 15, 2021 · 1 comment
Open

Usage of non C99 features #26

KlemenPl opened this issue Apr 15, 2021 · 1 comment

Comments

@KlemenPl
Copy link

For example:

typedef struct 
{
    union 
    {
        f32 xy[2];
        struct 
        {
            f32 x, y;
        };
    };
} gs_vec2;

This would not compile on a compiler only supporting C99 without extensions. When compiling with -pedantic -std=c99 flags it would yield: warning: anonymous unions are a C11 extension [-Wc11-extensions]... Using anonymous unions and structs is not supported in C99 standard. It was introduced in C11 standard.

@MrFrenik
Copy link
Owner

Thanks for pointing this out. I'll switch these unions to being named to fix it.

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

2 participants