Jump to content
  • Advertisement
Sign in to follow this  
Boost113

Compiler warning about missing ending '

This topic is 538 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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!