mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-12-22 23:29:27 +00:00
28 lines
489 B
C++
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");
|
|
}
|