aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2008-04-21 14:02:00 +0000
committerTom Tromey <tromey@gcc.gnu.org>2008-04-21 14:02:00 +0000
commit688e7a53446776e4d7b49472b06fec29ea69ff17 (patch)
tree95c70d6534e91125519d9a8f2e7c2cf84de0c82b /gcc/testsuite
parent009890be6c6e3f34630be0f086303d42c6aa867b (diff)
downloadgcc-688e7a53446776e4d7b49472b06fec29ea69ff17.zip
gcc-688e7a53446776e4d7b49472b06fec29ea69ff17.tar.gz
gcc-688e7a53446776e4d7b49472b06fec29ea69ff17.tar.bz2
re PR preprocessor/33415 (Can't compile .cpp file with UTF-8 BOM.)
libcpp PR libcpp/33415: * charset.c (_cpp_convert_input): Add buffer_start argument. Ignore UTF-8 BOM if seen. * internal.h (_cpp_convert_input): Add argument. * files.c (struct _cpp_file) <buffer_start>: New field. (destroy_cpp_file): Free buffer_start, not buffer. (_cpp_pop_file_buffer): Likewise. (read_file_guts): Update. gcc/testsuite PR libcpp/33415: * gcc.dg/cpp/pr33415.c: New file. From-SVN: r134507
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pr33415.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 23c6f7e..02e190f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-21 Tom Tromey <tromey@redhat.com>
+
+ PR libcpp/33415:
+ * gcc.dg/cpp/pr33415.c: New file.
+
2008-04-21 Olivier Hainque <hainque@adacore.com>
* gnat.dg/bltins.adb: New testcase.
diff --git a/gcc/testsuite/gcc.dg/cpp/pr33415.c b/gcc/testsuite/gcc.dg/cpp/pr33415.c
new file mode 100644
index 0000000..28ffe23
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/pr33415.c
@@ -0,0 +1,6 @@
+ /* Test case for PR 33415. Note that the first bytes of this file
+ are a UTF-8 BOM. */
+
+/* { dg-do compile } */
+
+int f(void) { return 5; }