For questions about the intricacies of formal or authoritative specifications of programming languages and environments.
Is there a semantic difference between auto const and const auto, or do they mean the same thing?
c++ c++11 language-lawyer constants autoOne of my kids is taking Java in high school and had this on one of his tests: Which of …
java language-lawyer main identifierConsider #include <iostream> int main() { double a = 1.0 / 0; double b = -1.0 / 0; double c = 0.0 / 0; std::cout << a <&…
c++ floating-point language-lawyer undefined-behavior divide-by-zeroConsider the following code: #include <iostream> struct foo { // (a): void bar() { std::cout << "gman was here" &…
c++ undefined-behavior language-lawyer standards-compliance null-pointerPrelude: std::tuple<int, int, int> f(); std::tuple<int, int, float, int> g(); C++1z …
c++ language-lawyer c++17Before you start yelling undefined behaviour, this is explicitly listed in N4659 (C++17) i = i++ + 1; // the value of i is …
c++ language-lawyer c++17Updated, see below! I have heard and read that C++0x allows an compiler to print "Hello" for the following …
c++ loops c++11 language-lawyer undefined-behaviorAn example of unspecified behavior in the C language is the order of evaluation of arguments to a function. It …
c language-lawyer undefined-behavior unspecified-behaviorThrough a little typo, I accidentally found this construct: int main(void) { char foo = 'c'; switch(foo) { printf("Cant Touch …
c switch-statement language-lawyerWhat is a "trap representation" in C (some examples might help)? Does this apply to C++? Given this code... float …
c++ c visual-studio-2010 gcc language-lawyer