ORCA-C/Tests/Deviance/D3.5.5.1.CC
2017-10-21 18:40:19 -05:00

28 lines
489 B
C++

/* Deviance Test 3.5.5.1: Ensure invalid defined expressions are caught */
#define NAME "hey, you!"
main ()
{
if (defined NAME) /* defined can only appear in #if or #elif */
;
while (! (defined (NONAME)) )
;
do
while (defined (NAME));
for (;defined (NAME);;)
;
switch (defined (NAME))
;
#if defined /* missing name operand */
#elif defined
#endif
printf ("Failed Deviance Test 3.5.5.1\n");
}