-
Notifications
You must be signed in to change notification settings - Fork 302
Allow GNU extensions when requested. #162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Axel-Naumann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, good idea! Thanks for your PR - could you address the tiny comments of mine?
| void Parse(int argc, const char* const argv[], | ||
| std::vector<std::string>* Inputs = nullptr); | ||
|
|
||
| ///\brief Whether the options given will not override anything for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The options given where? Who will override? What's "for the Interpreter's default language options"? What does "false" mean given "whether... will not"? I.e. could you expand yet simplify this doc a bit? :-)
| PPOpts.addMacroDef("__CLING__CXX11"); | ||
| } | ||
| if (CI->getLangOpts().CPlusPlus14 == 1) | ||
| PPOpts.addMacroDef("__CLING__CXX14"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
..and why not 17?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One day, I didn't think wise to mark __CLING__CXX17 until C++17 was ratified.
| //------------------------------------------------------------------------------ | ||
|
|
||
| // RUN: cat %s | %cling -D__STRICT_ANSI__ -std=gnu++11 -Xclang -verify 2>&1 | FileCheck %s | ||
| // RUN: cat %s | %cling -std=gnu99 -x c -Xclang -verify 2>&1 | FileCheck %s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a test for -std=c++1z? Reason is that cling cannot be compiled with both 1z and 11, so this will check that we don't override the -std by whatever cling detects at build time. (Yes, one could argue gnu99 could play that role, but that has a language change included; I'd prefer to test these two items separately.)
|
Done excluding |
There are uses that are valid even if the host compiled with _GLIBCXX_USE_FLOAT128.
|
Thanks, merged! |
& remove outdated comments.