#error directive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi
I have included the #error directive in my code to test for C++14 support:

#if __GNUC__ && (__cplusplus < 201402L)
    #error Requires a C++14 compliant compiler
#endif

When that condition is not met compilation gives:

main.cpp:32:3: error: #error Requires a C++14 compliant compiler
  #error Requires a C++14 compliant compiler
   ^

Is that the expected message?  The caret under #error suggests to me that
the #error line is invalid, not the condition.

Best regards

David



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux