Francois Grieu <fg****@francenet.fr> writes:
[on avoiding a macro definition of a library function by
enclosing the name in parentheses]
Illustrated below. Is this
- directly implied by the standard ?
- portable across actual implementations ?
Implied? Actually it's explicitly stated. See C99 7.1.4#1:
Any macro definition of a function can be suppressed locally
by enclosing the name of the function in parentheses,
because the name is then not followed by the left
parenthesis that indicates expansion of a macro function
name. For the same syntactic reason, it is permitted to take
the address of a library function even if it is also defined
as a macro.
--
"Some programming practices beg for errors;
this one is like calling an 800 number
and having errors delivered to your door."
--Steve McConnell