summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-12 10:44:06 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-12 10:44:06 +0000
commitbb1fa6bb7346b75421ab702f475f3a711a02f822 (patch)
tree96b619db02d90b96e5dc09601db8bd7a58e95367 /gcc/testsuite
parent1a6a3e92b3ef88587fc1da44fea2d50b817e5440 (diff)
downloadgcc-bb1fa6bb7346b75421ab702f475f3a711a02f822.tar.gz
Index: libcpp/ChangeLog
2005-03-12 Geoffrey Keating <geoffk@apple.com> * directives.c (glue_header_name): Update call to cpp_spell_token. * internal.h (_cpp_interpret_identifier): New. * charset.c (_cpp_interpret_identifier): New. (_cpp_valid_ucn): Allow UCN version of '$'. * lex.c (lex_identifier): Add extra parameter to indicate if initial character was '$' or '\'. Support identifiers with UCNs. (forms_identifier_p): Allow UCNs. (_cpp_lex_direct): Pass extra parameter to lex_identifier. (utf8_to_ucn): New. (cpp_spell_token): Add FORSTRING parameter. Use it. (cpp_token_as_text): Update call to cpp_spell_token. (cpp_output_token): Write UCNs back out. (stringify_arg): Update call to cpp_spell_token. (paste_tokens): Likewise. (cpp_macro_definition): Likewise. * macro.c (stringify_arg): Likewise. (paste_tokens): Likewise. (cpp_macro_definition): Likewise. * include/cpplib.h: Add parameter to cpp_spell_token. Index: gcc/ChangeLog 2005-03-12 Geoffrey Keating <geoffk@apple.com> * c-lex.c (c_lex_with_flags): Add parameter to call to cpp_spell_token. Index: gcc/testsuite/ChangeLog 2005-03-12 Geoffrey Keating <geoffk@apple.com> * gcc.dg/ucnid-1.c: New. * gcc.dg/ucnid-2.c: New. * gcc.dg/ucnid-3.c: New. * gcc.dg/ucnid-4.c: New. * gcc.dg/ucnid-5.c: New. * gcc.dg/ucnid-6.c: New. * gcc.dg/cpp/ucnid-1.c: New. * gcc.dg/cpp/ucnid-2.c: New. * gcc.dg/cpp/ucnid-3.c: New. * g++.dg/other/ucnid-1.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96333 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog13
-rw-r--r--gcc/testsuite/g++.dg/other/ucnid-1.C25
-rw-r--r--gcc/testsuite/gcc.dg/cpp/ucnid-1.c26
-rw-r--r--gcc/testsuite/gcc.dg/cpp/ucnid-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/cpp/ucnid-3.c7
-rw-r--r--gcc/testsuite/gcc.dg/ucnid-1.c25
-rw-r--r--gcc/testsuite/gcc.dg/ucnid-2.c26
-rw-r--r--gcc/testsuite/gcc.dg/ucnid-3.c26
-rw-r--r--gcc/testsuite/gcc.dg/ucnid-4.c26
-rw-r--r--gcc/testsuite/gcc.dg/ucnid-5.c14
-rw-r--r--gcc/testsuite/gcc.dg/ucnid-6.c26
11 files changed, 230 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7760588137a..5e748ada585 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,18 @@
2005-03-12 Geoffrey Keating <geoffk@apple.com>
+ * gcc.dg/ucnid-1.c: New.
+ * gcc.dg/ucnid-2.c: New.
+ * gcc.dg/ucnid-3.c: New.
+ * gcc.dg/ucnid-4.c: New.
+ * gcc.dg/ucnid-5.c: New.
+ * gcc.dg/ucnid-6.c: New.
+ * gcc.dg/cpp/ucnid-1.c: New.
+ * gcc.dg/cpp/ucnid-2.c: New.
+ * gcc.dg/cpp/ucnid-3.c: New.
+ * g++.dg/other/ucnid-1.C: New.
+
+2005-03-12 Geoffrey Keating <geoffk@apple.com>
+
* gcc.dg/vmx/darwin-abi-3.c: Delete.
2005-03-11 Per Bothner <per@bothner.com>
diff --git a/gcc/testsuite/g++.dg/other/ucnid-1.C b/gcc/testsuite/g++.dg/other/ucnid-1.C
new file mode 100644
index 00000000000..a5884bc8888
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/ucnid-1.C
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+#include <cstdlib>
+
+int \u00C0(void) { return 1; }
+int \u00C1(void) { return 2; }
+int \U000000C2(void) { return 3; }
+int wh\u00ff(void) { return 4; }
+int a\u00c4b\u0441\U000003b4e(void) { return 5; }
+
+int main (void)
+{
+
+ if (\u00C0() != 1)
+ abort ();
+ if (\u00c1() != 2)
+ abort ();
+ if (\u00C2() != 3)
+ abort ();
+ if (wh\u00ff() != 4)
+ abort ();
+ if (a\u00c4b\u0441\U000003b4e() != 5)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-1.c b/gcc/testsuite/gcc.dg/cpp/ucnid-1.c
new file mode 100644
index 00000000000..bc516cae92e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/ucnid-1.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+/* { dg-options "-std=c99" } */
+void abort (void);
+
+#define \u00C0 1
+#define \u00C1 2
+#define \U000000C2 3
+#define wh\u00ff 4
+#define a\u00c4b\u0441\U000003b4e 5
+
+int main (void)
+{
+
+ if (\u00C0 != 1)
+ abort ();
+ if (\u00c1 != 2)
+ abort ();
+ if (\u00C2 != 3)
+ abort ();
+ if (wh\u00ff != 4)
+ abort ();
+ if (a\u00c4b\u0441\U000003b4e != 5)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-2.c b/gcc/testsuite/gcc.dg/cpp/ucnid-2.c
new file mode 100644
index 00000000000..616680a969e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/ucnid-2.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+/* { dg-options "-std=c99" } */
+#include <stdlib.h>
+#include <string.h>
+
+#define str(t) #t
+
+int main (void)
+{
+ const char s[] = str (\u30b2);
+
+ if (strcmp (s, "\u30b2") != 0)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-3.c b/gcc/testsuite/gcc.dg/cpp/ucnid-3.c
new file mode 100644
index 00000000000..a910037c316
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/ucnid-3.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c99" } */
+
+#define paste(x, y) x ## y
+
+int paste(\u00aa, \u0531) = 3;
+
diff --git a/gcc/testsuite/gcc.dg/ucnid-1.c b/gcc/testsuite/gcc.dg/ucnid-1.c
new file mode 100644
index 00000000000..a8d49a3e16d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ucnid-1.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-options "-std=c99" } */
+void abort (void);
+
+int main (void)
+{
+ int \u00C0 = 1;
+ int \u00C1 = 2;
+ int \U000000C2 = 3;
+ int wh\u00ff = 4;
+ int a\u00c4b\u0441\U000003b4e = 5;
+
+ if (\u00C0 != 1)
+ abort ();
+ if (\u00c1 != 2)
+ abort ();
+ if (\u00C2 != 3)
+ abort ();
+ if (wh\u00ff != 4)
+ abort ();
+ if (a\u00c4b\u0441\U000003b4e != 5)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/ucnid-2.c b/gcc/testsuite/gcc.dg/ucnid-2.c
new file mode 100644
index 00000000000..8288514ecd6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ucnid-2.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+/* { dg-options "-std=c99" } */
+void abort (void);
+
+static int \u00C0 = 1;
+static int \u00C1 = 2;
+static int \U000000C2 = 3;
+static int wh\u00ff = 4;
+static int a\u00c4b\u0441\U000003b4e = 5;
+
+int main (void)
+{
+
+ if (\u00C0 != 1)
+ abort ();
+ if (\u00c1 != 2)
+ abort ();
+ if (\u00C2 != 3)
+ abort ();
+ if (wh\u00ff != 4)
+ abort ();
+ if (a\u00c4b\u0441\U000003b4e != 5)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/ucnid-3.c b/gcc/testsuite/gcc.dg/ucnid-3.c
new file mode 100644
index 00000000000..66e84141fdf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ucnid-3.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+/* { dg-options "-std=c99" } */
+void abort (void);
+
+int \u00C0 = 1;
+int \u00C1 = 2;
+int \U000000C2 = 3;
+int wh\u00ff = 4;
+int a\u00c4b\u0441\U000003b4e = 5;
+
+int main (void)
+{
+
+ if (\u00C0 != 1)
+ abort ();
+ if (\u00c1 != 2)
+ abort ();
+ if (\u00C2 != 3)
+ abort ();
+ if (wh\u00ff != 4)
+ abort ();
+ if (a\u00c4b\u0441\U000003b4e != 5)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/ucnid-4.c b/gcc/testsuite/gcc.dg/ucnid-4.c
new file mode 100644
index 00000000000..35725a35f94
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ucnid-4.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+/* { dg-options "-std=c99" } */
+void abort (void);
+
+int \u00C0(void) { return 1; }
+int \u00C1(void) { return 2; }
+int \U000000C2(void) { return 3; }
+int wh\u00ff(void) { return 4; }
+int a\u00c4b\u0441\U000003b4e(void) { return 5; }
+
+int main (void)
+{
+
+ if (\u00C0() != 1)
+ abort ();
+ if (\u00c1() != 2)
+ abort ();
+ if (\u00C2() != 3)
+ abort ();
+ if (wh\u00ff() != 4)
+ abort ();
+ if (a\u00c4b\u0441\U000003b4e() != 5)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/ucnid-5.c b/gcc/testsuite/gcc.dg/ucnid-5.c
new file mode 100644
index 00000000000..08cd9c2bf7d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ucnid-5.c
@@ -0,0 +1,14 @@
+/* { dg-do run } */
+/* { dg-options "-std=c99 -fdollars-in-identifiers" } */
+void abort (void);
+
+int a$b(void) { return 1; }
+
+int main (void)
+{
+
+ if (a\u0024b() != 1)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/ucnid-6.c b/gcc/testsuite/gcc.dg/ucnid-6.c
new file mode 100644
index 00000000000..61c8c3e089a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ucnid-6.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+/* { dg-options "-std=c99 -save-temps" } */
+void abort (void);
+
+int \u00C0(void) { return 1; }
+int \u00C1(void) { return 2; }
+int \U000000C2(void) { return 3; }
+int wh\u00ff(void) { return 4; }
+int a\u00c4b\u0441\U000003b4e(void) { return 5; }
+
+int main (void)
+{
+
+ if (\u00C0() != 1)
+ abort ();
+ if (\u00c1() != 2)
+ abort ();
+ if (\u00C2() != 3)
+ abort ();
+ if (wh\u00ff() != 4)
+ abort ();
+ if (a\u00c4b\u0441\U000003b4e() != 5)
+ abort ();
+
+ return 0;
+}