electronicarts / EABase

EABase is a small set of header files that define platform-independent data types and platform feature macros.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

eabase.h redefines NULL as 0, which silences some compiler warnings

anomalous42 opened this issue · comments

eabase.h redefines NULL, which silences some compiler warnings. This is the code that does that: https://github.com/electronicarts/EABase/blob/master/include/Common/EABase/eabase.h#L65-L84

You can see the warnings in action by playing with the code at https://gcc.godbolt.org/z/UrrWs5

Maybe it should do #define NULL __null instead when using Clang? Or maybe just drop the #undef and wrap the definition in an #ifndef block, because gcc doesn't appear to have that problem any more?