Carl,

Here's the write-up of what I was seeing earlier today for my own record.

#if 1
#elif
#endif

gives "0:2(1): preprocessor warning: ignoring illegal #elif without
expression". gcc rejects it, but glcpp just warns since #if is true
and it doesn't need to evaluate #elif's nonexistent expression.

Switching #if 1 to #if 0 correctly gives "0:2(1): preprocessor error:
#elif with no expression".

Due to how skipping works, we have to pass the #elif tokens to the
parser, leading to situations like:

#if 0
# if 1
# elif
# endif
#endif

which still gives the warning message.

Matt
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to