Defect Report #086
Submission Date: 03 Dec 93
Source: Clive Feather
Item 23 - object-like macros in system headers
Consider an implementation where <string.h> defines the macro
#define strlen __internal_fast_strlen
and declares functions (defined elsewhere) called __internal_fast_strlen
and strlen, both with the functionality of strlen in subclause
220.127.116.11. Is such an implementation conforming with respect to the
rules of subclause 7.1.7?
Note that a strictly conforming application can detect this situation
by comparing the value of the expression strlen taken before
and after a #undef.
The question asks whether a system header can define the name of a library
function as an object-like macro, and cites subclause 7.1.7
as not using the term ``function-like.''
The Committee notes the absence of this term, but also notes that subclause
7.1.7 requires that the macro definition
always be suppressed when not followed
by an open parenthesis. Therefore such macros must either be function-like,
or the implementation must cause them to act as function-like macros.
Previous Defect Report
< - >
Next Defect Report