This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/60570] expression in 'elif' directive mis-diagnosed as error when group will be skipped
- From: "moshansky at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 22 Jan 2015 02:57:54 +0000
- Subject: [Bug preprocessor/60570] expression in 'elif' directive mis-diagnosed as error when group will be skipped
- Auto-submitted: auto-generated
- References: <bug-60570-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60570
moshansky at hotmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |moshansky at hotmail dot com
--- Comment #4 from moshansky at hotmail dot com ---
Still present as of gcc version 4.8.4 20140526 (release)
[ARM/embedded-4_8-branch revision 211358] (GNU Tools for ARM Embedded
Processors).
Fails:
#if(1)
#pragma message "This Should Work"
#elif(1/0)
#pragma message "1/0 should not be attempted"
#endif
Workaround:
#if(1)
#pragma message "This Should Work"
#else
#elif(1/0)
#pragma message "1/0 should is not attempted"
#endif
#endif