why does Erlang define macros reserved for the C compiler?

Matthias Lang <>
Wed May 17 19:38:25 CEST 2006


I'm looking at erts/emulator/beam/sys.h.

When building Erlang, the compiler prints out a bunch of warnings
about __deprecated being redefined. This seems to be C99 7.1.3 in
action, i.e. identifiers starting with _ are reserved for the C
compiler and C library.

The defines in that file with leading underscores:

  __SYS_H__
  _DOTS_
  _VOID_
  __noreturn
  __deprecated
  _POSIX_SOURCE
  _XOPEN_SOURCE

Some of these, e.g. __deprecated, look like some sort of GCC
voodoo. Does anybody know more?

Matthias



More information about the erlang-questions mailing list