[RFC][PATCH v3] Initial support for C11 Annex K Bounds checking functions

Ulrich Bayer ubayer@sba-research.org
Fri Jun 14 17:03:00 GMT 2013


On 14.06.2013 18:10, Paul Eggert wrote:
>
> /* Check that C11 Annex K declarations are consistently either included
>    or excluded for all standard headers.  */
> #if defined __STDC_WANT_LIB_EXT1__ &&  __STDC_WANT_LIB_EXT1__ == 1
> # define __GLIBC_USE_LIB_EXT1 1
> #else
> # define __GLIBC_USE_LIB_EXT1 0
> #endif
> 
> (Heh.  This is probably what the standard-writers had in mind, if
> they thought about the problem at all....)
> 
> The rest of the .h file can use "#if __GLIBC_USE_LIB_EXT1" to decide
> whether to include _s declarations.

I'm all for simplification but that seems oversimplified to me. :)
Would that be in a central file?
Do you suggest to not print out any preprocessor error messages for 
inconsistent definitions at all?

> That's OK in my book, since #defining __STDC_WANT_LIB_EXT1__
> to a value other than 0 or 1 has undefined behavior. 

I see your point.



More information about the Libc-alpha mailing list