This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/60570] expression in 'elif' directive mis-diagnosed as error when group will be skipped


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]