Skip to content

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

@anomalous42

Description

@anomalous42

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions