- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use this compilation lines:
icpc -std=c++98 -pedantic-errors integers.cc
To compile the following piece of code:
int i = 0b10101; std::cout << i << std::endl;
It compiles well and works perfectly (the output is 21).
To verify that i use the correct compiler flags I add the following line
auto g () { return 2.3; }
And indeed in this case I get the expected compiler error when using the compiler flags.
Binary literals is a feature that is supposed to exist only since C++14. So why does my code of binary literals compile? Is it icpc bug?
(With g++ and same flags, it works as expected and does not compile with the binary literals)
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Seems like icpc didn't catch this case of -std=c++98.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page