Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For precisely this reason, third-party libraries should not be including <stdnoreturn.h> in their external headers unless they are specifically intended to work only on C1x.

Under the _C_SOURCE scheme they certainly shouldn't be defining that macro, since the program which is including them has likely already defined it and you cannot have a duplicate macro definition. If they care, they should instead be testing its current value with #if, not changing it - ie, if a library requires C11x then it would use something like:

  #if _C_SOURCE < 20110101
      #error C11x or better required for this library
  #endif


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: