Defect Report #089

Submission Date: 03 Dec 93
Submittor: WG14
Source: Clive Feather
Question
Item 26 - multiple definitions of macros
Consider the following code:
#define macro object_like
#define macro(argument) function_like

Does this code require a diagnostic?
The wording of subclause 6.8.3 specifies that a macro may be redefined under certain circumstances (basically identical definitions), but does not actually forbid any other redefinition. Thus it can be argued that the constraint in subclause 6.8.3 is not violated, and a diagnostic is not required.
Correction
In subclause 6.8.3, page 89, change, in both paragraphs 2 and 3:
may be redefined by another #define preprocessing directive provided that
to:
shall not be redefined by another #define preprocessing directive unless
Previous Defect Report < - > Next Defect Report