• 9
• 9
• 10
• 9
• 10

# Compiler warning about missing ending '

## Recommended Posts

This check in some of the add-ons:

#ifdef AS_CAN_USE_CPP11
#include <chrono>
#else
#error Sorry, this requires C++11 which your compiler doesn't appear to support
#endif


Causes warnings about there being a missing ' character:

/home/hhyyrylainen/Projects/leviathan/libraries/include/add_on/datetime/datetime.h:12:60: varoitus: päättävä merkki ' puuttuu
#error Sorry, this requires C++11 which your compiler doesn't appear to support
^


This is nothing major, but it does cause annoying warnings when rebuilding files that include the add-on headers.

##### Share on other sites
Try escaping the single quotation mark. \'

Edit: oh...this is the angelCode forum..my bad.

##### Share on other sites
You can just put the entire string in double quotes, and it should be fine. \' should also work. Or '''.

The issue is that technically ' is not a valid preprocessor token unless it is part of a character constant or part of a string literal. Some compilers ignore this restriction, so the code you provided may or may not cause an error.

##### Share on other sites

Thanks Boost113. I'll have this fixed.

*EDIT*

This had already been fixed last year, in revision 2331. I guess you haven't updated the library and/or add-ons in a while.

Edited by Andreas Jonsson