summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.bugs/900404_02.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.bugs/900404_02.C')
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900404_02.C24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900404_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900404_02.C
new file mode 100755
index 0000000..4099daa
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900404_02.C
@@ -0,0 +1,24 @@
+// g++ 1.37.1 bug 900404_02
+
+// g++ fails to treat multicharacter literals as type "int" as required by
+// section 2.5.2 of the C++ Reference Manual.
+
+// The result is that the following program will exit with a non-zero
+// exit status.
+
+// keywords: character literals, multi-character literals, int type
+
+int exit_status = 0;
+
+void function0 (int i) // function that should be called
+{
+ i = i;
+}
+
+void function0 (char c) // function that is actually called
+{
+ c = c;
+ exit_status++;
+}
+
+int main () { function0 ('abcd'); return exit_status; } // WARNING -