aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppinit.c
diff options
context:
space:
mode:
authorEric Christopher <echristo@gcc.gnu.org>2004-02-02 20:20:58 +0000
committerEric Christopher <echristo@gcc.gnu.org>2004-02-02 20:20:58 +0000
commit16dd5cfeb8364bb5b8ea60de17788a2d414c8972 (patch)
treeceb6203dee329b18b1ae6797a54fb24e65a13847 /gcc/cppinit.c
parent6699d593734ee8f2cf7472ac581e123e54936be4 (diff)
downloadgcc-16dd5cfeb8364bb5b8ea60de17788a2d414c8972.zip
gcc-16dd5cfeb8364bb5b8ea60de17788a2d414c8972.tar.gz
gcc-16dd5cfeb8364bb5b8ea60de17788a2d414c8972.tar.bz2
[multiple changes]
2004-02-02 Eric Christopher <echristo@redhat.com> Zack Weinberg <zack@codesourcery.com> * c-opts.c (c_common_handle_option): Add -finput-charset. * c.opt: Ditto. * cppcharset.c (one_iso88591_to_utf8): Remove. (convert_iso88591_utf8): Ditto. (conversion_tab): Remove 8859-1 converter. (_cpp_input_to_utf8): Remove. (_cpp_init_iconv_buffer): Ditto. (_cpp_close_iconv_buffer): Ditto. (_cpp_convert_input): New function. (_cpp_default_encoding): Ditto. * cpphash.h: Add/remove prototypes for above. * cppfiles.c (read_file_guts): Use _cpp_convert_input. * cppinit.c (cpp_create_reader): Use _cpp_default_encoding for narrow execution and input character sets. * cpplib.c (cpp_push_buffer): Delete uses of removed functions. * doc/cppopts.texi: Document -finput-charset. 2004-02-02 Eric Christopher <echristo@redhat.com> Zack Weinberg <zack@codesourcery.com> * gcc.c-torture/execute/wchar_t-1.c: Add -finput-charset. 2004-01-29 Eric Christopher <echristo@redhat.com> Zack Weinberg <zack@codesourcery.com> * testsuite/22_locale/collate/compare/wchar_t/2.cc: Remove xfail. Use -finput-charset. * testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc: Ditto. * testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc: Ditto * testsuite/22_locale/collate/hash/wchar_t/2.cc: Ditto. * testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc: Ditto. * testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc: Ditto. * testsuite/22_locale/collate/transform/wchar_t/2.cc: Ditto. * testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc: Ditto. * testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc: Ditto. From-SVN: r77136
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r--gcc/cppinit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index ab2331d..d6509fd 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -159,11 +159,11 @@ cpp_create_reader (enum c_lang lang, hash_table *table,
CPP_OPTION (pfile, bytes_big_endian) = 1; /* does not matter */
/* Default to no charset conversion. */
- CPP_OPTION (pfile, narrow_charset) = 0;
+ CPP_OPTION (pfile, narrow_charset) = _cpp_default_encoding ();
CPP_OPTION (pfile, wide_charset) = 0;
- /* Default the input character set to iso-8859-1 for now. */
- CPP_OPTION (pfile, input_charset) = "ISO-8859-1";
+ /* Default the input character set to UTF-8. */
+ CPP_OPTION (pfile, input_charset) = _cpp_default_encoding ();
/* A fake empty "directory" used as the starting point for files
looked up without a search path. Name cannot be '/' because we
@@ -579,7 +579,7 @@ read_original_directory (cpp_reader *pfile)
debugdir[token->val.str.len - 4] = '\0';
pfile->cb.dir_change (pfile, debugdir);
- }
+ }
/* We want to process the fake line changes as regular changes, to
get them output. */
@@ -591,7 +591,7 @@ read_original_directory (cpp_reader *pfile)
/* This is called at the end of preprocessing. It pops the last
buffer and writes dependency output, and returns the number of
errors.
-
+
Maybe it should also reset state, such that you could call
cpp_start_read with a new filename to restart processing. */
int