diff options
author | Geoffrey Keating <geoffk@apple.com> | 2005-03-15 00:36:33 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2005-03-15 00:36:33 +0000 |
commit | 50668cf626cf30043890f1000f500ce69a54fedb (patch) | |
tree | d3cd092701f32b8f84eec7a95a4e244aafcf795e /libcpp/include/cpplib.h | |
parent | cd8b38b9eb3dfdc7709ad0088ff543a3a2df67ec (diff) | |
download | gcc-50668cf626cf30043890f1000f500ce69a54fedb.zip gcc-50668cf626cf30043890f1000f500ce69a54fedb.tar.gz gcc-50668cf626cf30043890f1000f500ce69a54fedb.tar.bz2 |
Index: gcc/ChangeLog
2005-03-14 Geoffrey Keating <geoffk@apple.com>
* doc/cppopts.texi (-fexec-charset): Add concept index entry.
(-fwide-exec-charset): Likewise.
(-finput-charset): Likewise.
* doc/invoke.texi (Warning Options): Document -Wnormalized=.
* c-opts.c (c_common_handle_option): Handle -Wnormalized=.
* c.opt (Wnormalized): New.
Index: libcpp/ChangeLog
2005-03-14 Geoffrey Keating <geoffk@apple.com>
* init.c (cpp_create_reader): Default warn_normalize to normalized_C.
* charset.c: Update for new format of ucnid.h.
(ucn_valid_in_identifier): Update for new format of ucnid.h.
Add NST parameter, and update it; update callers.
(cpp_valid_ucn): Add NST parameter, update callers. Replace abort
with cpp_error.
(convert_ucn): Pass normalize_state to cpp_valid_ucn.
* internal.h (struct normalize_state): New.
(INITIAL_NORMALIZE_STATE): New.
(NORMALIZE_STATE_RESULT): New.
(NORMALIZE_STATE_UPDATE_IDNUM): New.
(_cpp_valid_ucn): New.
* lex.c (warn_about_normalization): New.
(forms_identifier_p): Add normalize_state parameter, update callers.
(lex_identifier): Add normalize_state parameter, update callers. Keep
the state current.
(lex_number): Likewise.
(_cpp_lex_direct): Pass normalize_state to subroutines. Check
it with warn_about_normalization.
* makeucnid.c: New.
* ucnid.h: Replace.
* ucnid.pl: Remove.
* ucnid.tab: Make appropriate for input to makeucnid.c. Remove
comments about obsolete version of C++.
* include/cpplib.h (enum cpp_normalize_level): New.
(struct cpp_options): Add warn_normalize field.
Index: gcc/testsuite/ChangeLog
2005-03-14 Geoffrey Keating <geoffk@apple.com>
* gcc.dg/cpp/normalize-1.c: New.
* gcc.dg/cpp/normalize-2.c: New.
* gcc.dg/cpp/normalize-3.c: New.
* gcc.dg/cpp/normalize-4.c: New.
* gcc.dg/cpp/ucnid-4.c: New.
* gcc.dg/cpp/ucnid-5.c: New.
* g++.dg/cpp/normalize-1.C: New.
* g++.dg/cpp/ucnid-1.C: New.
From-SVN: r96459
Diffstat (limited to 'libcpp/include/cpplib.h')
-rw-r--r-- | libcpp/include/cpplib.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index ccf8bff..321de40 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -236,6 +236,19 @@ typedef CPPCHAR_SIGNED_T cppchar_signed_t; /* Style of header dependencies to generate. */ enum cpp_deps_style { DEPS_NONE = 0, DEPS_USER, DEPS_SYSTEM }; +/* The possible normalization levels, from most restrictive to least. */ +enum cpp_normalize_level { + /* In NFKC. */ + normalized_KC = 0, + /* In NFC. */ + normalized_C, + /* In NFC, except for subsequences where being in NFC would make + the identifier invalid. */ + normalized_identifier_C, + /* Not normalized at all. */ + normalized_none +}; + /* This structure is nested inside struct cpp_reader, and carries all the options visible to the command line. */ struct cpp_options @@ -373,6 +386,10 @@ struct cpp_options /* Holds the name of the input character set. */ const char *input_charset; + /* The minimum permitted level of normalization before a warning + is generated. */ + enum cpp_normalize_level warn_normalize; + /* True to warn about precompiled header files we couldn't use. */ bool warn_invalid_pch; |