coin3d / coin

Coin3D core library
BSD 3-Clause "New" or "Revised" License
284 stars 108 forks source link

<Inventor/errors/SoDebugErrors.h> leaves macro ERROR defined to an undeclared symbol #468

Open kazssym opened 3 years ago

kazssym commented 3 years ago

The header defines ERROR as an undeclared symbol. It seems it tries to save and restore the original definition of ERROR but it fails to do so.

https://github.com/coin3d/coin/blob/dfb56d294eeef3581e4322ed8881f478fc242dec/include/Inventor/errors/SoDebugError.h#L85

kazssym commented 3 years ago

Is it OK to have a definition like this?

enum {
    WIN32_ERROR = ERROR,
#undef ERROR
    ERROR = WIN32_ERROR
};