Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

clang compile warnings #47

Open
datgame opened this issue Sep 24, 2019 · 1 comment
Open

clang compile warnings #47

datgame opened this issue Sep 24, 2019 · 1 comment

Comments

@datgame
Copy link
Contributor

datgame commented Sep 24, 2019

#if CR_EXPAND(CR_HOST) == 1337
    ^
cr.h:526:22: note: expanded from macro 'CR_EXPAND'
#define CR_EXPAND(x) CR_DO_EXPAND(x)
                     ^
cr.h:525:25: note: expanded from macro 'CR_DO_EXPAND'
#define CR_DO_EXPAND(x) x##1337
                        ^
<scratch space>:560:1: note: expanded from here
CR_UNSAFE1337

when doing

#define CR_HOST CR_UNSAFE
#include "cr.h" 

i think also that CR_STATE is not working for me, (never tried before), because ASAN (clang++ -fsanitize=address) complains upon reload.
i tried adding these to the globals in stb_image.h

#include "cr.h"
static const char CR_STATE *stbi__g_failure_reason;

but ASAN still complains. not sure if that's correct in this matter or not, but i think so.

not sure if these 2 are related or not.
nor what to do about them

that was on linux.

trying to build the same on windows now, i get:

cr.h(455): warning C4109: unexpected identifier '_read'
stb_image.h(845): error C2341: '.state': segment must be defined using #pragma data_seg, code_seg or section prior to use
@fungos
Copy link
Owner

fungos commented Oct 9, 2019

Tested the CR_STATE CR_UNSAFE here and no warning at all (gcc/clang, linux). I don't have a windows box to test, so I'll let this open and maybe someone can help fix.

@fungos fungos pinned this issue Jan 10, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants