Skip to content

Instantly share code, notes, and snippets.

@sonOfRa
Created August 1, 2018 07:29
Show Gist options
  • Select an option

  • Save sonOfRa/a5d3e75c478f790dac7f50133f1c4255 to your computer and use it in GitHub Desktop.

Select an option

Save sonOfRa/a5d3e75c478f790dac7f50133f1c4255 to your computer and use it in GitHub Desktop.
simon@odin-linux  ~  g++ -Wall test.cpp
test.cpp: In function ‘int main(int, const char**)’:
test.cpp:4:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (0)
^~
test.cpp:6:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
std::cout << "blah" << std::endl;
^~~
#include <iostream>
int main(int argc, const char **argv) {
if (0)
std::cout << "blah" << std::endl;
std::cout << "blah" << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment