aboutsummaryrefslogtreecommitdiff
path: root/tests/hello_cxx03.cpp
diff options
context:
space:
mode:
authorJukka Jylänki <jujjyl@gmail.com>2013-02-01 22:48:09 +0200
committerJukka Jylänki <jujjyl@gmail.com>2013-02-01 22:51:35 +0200
commit9dd7e94ecd16a6b4200a276880f378c3e155c212 (patch)
tree659019ba2d0c3f2c8e23f6440071c55acdb8de36 /tests/hello_cxx03.cpp
parentc40babef1f7774dde1a7eaa16fddc59929539481 (diff)
Compile with -std=c++03 consistently on all platforms. By default, Clang 3.2 inconsistently uses C++11 for Windows and C++03 for Linux if user did not specify -std= on the command line. Fixes other.test_embind and *.test_llvmswitch. Add unit tests that confirm that .cpp files are compiled with C++03 std by default.
Diffstat (limited to 'tests/hello_cxx03.cpp')
-rw-r--r--tests/hello_cxx03.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/hello_cxx03.cpp b/tests/hello_cxx03.cpp
new file mode 100644
index 00000000..d6cc766a
--- /dev/null
+++ b/tests/hello_cxx03.cpp
@@ -0,0 +1,10 @@
+#include <stdio.h>
+
+#if __cplusplus != 199711L
+#error By default, if no -std is specified, emscripten should be compiling with -std=c++03!
+#endif
+
+int main( int argc, const char *argv[] ) {
+ printf("Hello world!\\n");
+ return 0;
+}