Advertisement Jump to content
Sign in to follow this  
Boost113

Compiler warning about missing ending '

This topic is 630 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!