Skip to content

Instantly share code, notes, and snippets.

@EAirPeter
Created November 18, 2021 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EAirPeter/db14b51afecb88294b30bd24b49b0dd7 to your computer and use it in GitHub Desktop.
Save EAirPeter/db14b51afecb88294b30bd24b49b0dd7 to your computer and use it in GitHub Desktop.
Try it with clang
#include <cstdio>
using namespace std;
void Foo(void) {
//puts("Foo Start");
for (int i = 0; i >= 0; ++i) {
// Undefined behavior
}
puts("Foo End");
}
void Bar(void) {
puts("Bar");
}
int main() {
void (*volatile Invocable)(void) = Foo;
Invocable();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment