aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/c-ppoutput.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/ident-1.c7
4 files changed, 19 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2b59e0f..3f1b1a7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR c/16999
+ * c-ppoutput.c (cb_ident): Don't quote string as it is already
+ quoted.
+
2004-10-08 Diego Novillo <dnovillo@redhat.com>
* tree-ssa-pre.c (init_pre): Use size of ARRAY_REF to allocate
diff --git a/gcc/c-ppoutput.c b/gcc/c-ppoutput.c
index 9556399..64b27a7 100644
--- a/gcc/c-ppoutput.c
+++ b/gcc/c-ppoutput.c
@@ -304,7 +304,7 @@ cb_ident (cpp_reader *pfile ATTRIBUTE_UNUSED, source_location line,
const cpp_string *str)
{
maybe_print_line (line);
- fprintf (print.outf, "#ident \"%s\"\n", str->text);
+ fprintf (print.outf, "#ident %s\n", str->text);
print.src_line++;
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d16487d..bf8231b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR c/16999
+ * gcc.dg/cpp/ident-1.c: New test.
+
2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
* gcc.c-torture/compile/acc1.c: New.
diff --git a/gcc/testsuite/gcc.dg/cpp/ident-1.c b/gcc/testsuite/gcc.dg/cpp/ident-1.c
new file mode 100644
index 0000000..5437296
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/ident-1.c
@@ -0,0 +1,7 @@
+/* { dg-do preprocess } */
+
+/* Based on PR 16999 */
+
+#ident "this is an ident"
+
+/* { dg-final { scan-file "ident-1.i" "(^|\\n)#ident \"this is an ident\"($|\\n)" } } */