aboutsummaryrefslogtreecommitdiff
path: root/libcpp
AgeCommit message (Collapse)AuthorFilesLines
2009-11-11ChangeLog for libcppKai Tietz6-19/+341
2009-11-11 Kai Tietz <kai.tietz@onevision.com> * directives.c (do_pragma_push_macro): New pragma handler. (do_pragma_pop_macro): Likewise. (_cpp_init_internal_pragmas): Add push_macro and pop_macro handler to internal pragmas. (lex_macro_node_from_str): Removed. (cpp_push_definition): Replace lex_macro_node_from_str by _cpp_lex_identifier. (cpp_pop_definition): Likewise. * internal.h (_cpp_lex_identifier): New prototype. (def_pragma_macro): New structure. (cpp_reader): New member pushed_macros. * lex.c (_cpp_lex_identifier): New function. (lex_identifier_intern): New function. * init.c (cpp_create_reader): Initialize pushed_macros member. (cpp_destroy): Free elements in pushed_macros member. * pch.c (_cpp_save_pushed_macros): New function. (_cpp_restore_pushed_macros): Likewise. (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros. (cpp_read_state): Use _cpp_restore_pushed_macros. ChangeLog for gcc 2009-11-11 Kai Tietz <kai.tietz@onevision.com> * config/i386/cygming.h (HANDLE_PRAGMA_PUSH_POP_MACRO): Removed. * c-pragma.c (def_pragma_macro_value): Likewise. (def_pragma_macro): Likewise. (pushed_macro_table): Likewise. (HANDLE_PRAGMA_PUSH_POP_MACRO): Remove guarded code. * doc/tm.texi (HANDLE_PRAGMA_PUSH_POP_MACRO): Removed. ChangeLog for gcc/testsuite 2009-11-11 Kai Tietz <kai.tietz@onevision.com> * g++.dg/torture/pushpop_macro.C: New testcase. * gcc.c-torture/execute/pushpop_macro.c: New testcase. * gcc.dg/cpp/pragma-pop_macro-1.c: Allow test for all targets. From-SVN: r154098
2009-10-19charset.c (cpp_init_iconv): Initialize utf8_cset_desc.Jakub Jelinek7-16/+295
* charset.c (cpp_init_iconv): Initialize utf8_cset_desc. (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc and char32_cset_desc. (converter_for_type): Handle CPP_UTF8STRING. (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings. * directives.c (get__Pragma_string): Handle CPP_UTF8STRING. (parse_include): Reject raw strings. * include/cpplib.h (CPP_UTF8STRING): New token type. * internal.h (struct cpp_reader): Add utf8_cset_desc field. * lex.c (lex_raw_string): New function. (lex_string): Handle u8 string literals, call lex_raw_string for raw string literals. (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R" sequences. * macro.c (stringify_arg): Handle CPP_UTF8STRING. * c-common.c (c_parse_error): Handle CPP_UTF8STRING. * c-lex.c (c_lex_with_flags): Likewise. Test C_LEX_STRING_NO_JOIN instead of C_LEX_RAW_STRINGS. (lex_string): Handle CPP_UTF8STRING. * c-parser.c (c_parser_postfix_expression): Likewise. * c-pragma.h (C_LEX_RAW_STRINGS): Rename to ... (C_LEX_STRING_NO_JOIN): ... this. * parser.c (cp_lexer_print_token, cp_parser_is_string_literal, cp_parser_string_literal, cp_parser_primary_expression): Likewise. (cp_lexer_get_preprocessor_token): Use C_LEX_STRING_JOIN instead of C_LEX_RAW_STRINGS. * gcc.dg/raw-string-1.c: New test. * gcc.dg/raw-string-2.c: New test. * gcc.dg/raw-string-3.c: New test. * gcc.dg/raw-string-4.c: New test. * gcc.dg/raw-string-5.c: New test. * gcc.dg/raw-string-6.c: New test. * gcc.dg/raw-string-7.c: New test. * gcc.dg/utf8-1.c: New test. * gcc.dg/utf8-2.c: New test. * gcc.dg/utf-badconcat2.c: New test. * gcc.dg/utf-dflt2.c: New test. * gcc.dg/cpp/include6.c: New test. * g++.dg/ext/raw-string-1.C: New test. * g++.dg/ext/raw-string-2.C: New test. * g++.dg/ext/raw-string-3.C: New test. * g++.dg/ext/raw-string-4.C: New test. * g++.dg/ext/raw-string-5.C: New test. * g++.dg/ext/raw-string-6.C: New test. * g++.dg/ext/raw-string-7.C: New test. * g++.dg/ext/utf8-1.C: New test. * g++.dg/ext/utf8-2.C: New test. * g++.dg/ext/utf-badconcat2.C: New test. * g++.dg/ext/utf-dflt2.C: New test. From-SVN: r152995
2009-10-17* cpplib.pot: Regenerate.Joseph Myers2-149/+158
From-SVN: r152951
2009-10-14re PR preprocessor/41543 (BUILTINS_LOCATION wrong with -fpreprocessed)Jakub Jelinek3-2/+14
PR preprocessor/41543 * input.h (BUILTINS_LOCATION): Change to 1 from 2. Assert BUILTINS_LOCATION < RESERVED_LOCATION_COUNT. * tree.c: Include intl.h. (expand_location): Handle BUILTINS_LOCATION. * Makefile.in (tree.o): Depend on intl.h. * include/line-map.h (RESERVED_LOCATION_COUNT): Define. * line-map.c (linemap_init): Initialize highest_location and highest_line to RESERVED_LOCATION_COUNT-1 instead of 0. * gcc.dg/debug/dwarf2/pr41543.c: New test. From-SVN: r152761
2009-10-09* charset.c (_cpp_valid_ucn): Update C++0x restrictions.Jason Merrill2-6/+19
From-SVN: r152614
2009-10-10directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and sccs.Neil Vachharajani2-2/+7
2009-10-09 Neil Vachharajani <nvachhar@google.com> * libcpp/directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and sccs. * gcc/doc/cpp.texi (Other Directives): Do not list #ident and #sccs as deprecated. From-SVN: r152612
2009-09-23configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h.Loren J. Rittle3-2/+7
2009-09-23 Loren J. Rittle <ljrittle@acm.org> * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h. * configure: Rebuilt. From-SVN: r152081
2009-09-22re PR preprocessor/38987 (Including a precompiled header from another header ↵Richard Guenther2-0/+11
causes invalid assembly to be generated) 2009-09-22 Richard Guenther <rguenther@suse.de> PR pch/38987 * files.c (pch_open_file): Disallow non-toplevel PCH inclusion. From-SVN: r151970
2009-09-19* vi.po: Update.Joseph Myers2-4/+8
From-SVN: r151881
2009-09-18re PR preprocessor/28435 (-MMD vs not found system header (included from a ↵Chris Demetriou3-6/+31
system header)) [libcpp/ChangeLog] 2009-09-18 Chris Demetriou <cgd@google.com> PR preprocessor/28435: * include/cpplib.h (struct cpp_options): Add new member deps.need_preprocessor_output. * files.c (open_file_failed): If preprocessor output is needed always report an error. [gcc/ChangeLog] 2009-09-19 Chris Demetriou <cgd@google.com> PR preprocessor/28435: * c-opts.c (c_common_handle_option): For -MD and -MMD, indicate to cpplib that the preprocessor output is needed. [gcc/testsuite/ChangeLog] 2009-09-19 Chris Demetriou <cgd@google.com> PR preprocessor/28435: * gcc.dg/cpp/missing-header-MD.c: New test. * gcc.dg/cpp/missing-header-MMD.c: New test. * gcc.dg/cpp/missing-sysheader-MD.c: New test. * gcc.dg/cpp/missing-sysheader-MMD.c: New test. From-SVN: r151879
2009-09-13Changlog libcppKai Tietz3-0/+8
2009-09-13 Kai Tietz <kai.tietz@onevision.com> * configure.ac: Set for i?86-w64-mingw* need_64bit_hwint to yes. * configure: Regenerated. ChangeLog gcc 2009-09-13 Kai Tietz <kai.tietz@onevision.com> * config.gcc (tm_file): Remove i386/biarch32.h for i?86-w64-mingw* case. (i?86-*-mingw* andx86_64-*-mingw*): Add multilib support. * config.host: Set for cygwin and x86/x64 mingw the option use_long_long_for_widest_fast_int to yes. From-SVN: r151672
2009-09-12dbgcnt.c (dbg_cnt_process_single_pair): constify.Jason Merrill2-1/+6
gcc/ * dbgcnt.c (dbg_cnt_process_single_pair): constify. * opts.c (common_handle_option): constify. gcc/cp/ * repo.c (extract_string, get_base_filename, init_repo): constify. libcpp/ * directives.c (cpp_define): constify. From-SVN: r151661
2009-09-08* id.po: Update.Joseph Myers2-5/+9
From-SVN: r151508
2009-09-02macro.c (stringify_arg): Escape CPP_WCHAR tokens.Ian Lance Taylor2-1/+5
libcpp/: * macro.c (stringify_arg): Escape CPP_WCHAR tokens. gcc/testsuite/: * gcc.dg/20090902-1.c: New test. From-SVN: r151343
2009-09-02* es.po: Update.Joseph Myers2-17/+21
From-SVN: r151337
2009-08-24Update AC_PREREQ entries to 2.64Ralf Wildenhues2-1/+5
/: * configure.ac (AC_PREREQ): Bump to 2.64. intl/: * configure.ac (AC_PREREQ): Bump to 2.64. libdecnumber/: * configure.ac (AC_PREREQ): Bump to 2.64. libiberty/: * configure.ac (AC_PREREQ): Bump to 2.64. libjava/classpath/: * configure.ac (AC_PREREQ): Bump to 2.64. libjava/: * configure.ac (AC_PREREQ): Bump to 2.64. libjava/libltdl/: * configure.ac (AC_PREREQ): Bump to 2.64. Remove FIXME. libssp/: * configure.ac (AC_PREREQ): Bump to 2.64. libobjc/: * configure.ac (AC_PREREQ): Bump to 2.64. libstdc++-v3/: * configure.ac (AC_PREREQ): Bump to 2.64. libada/: * configure.ac (AC_PREREQ): Bump to 2.64. libgcc/: * configure.ac (AC_PREREQ): Bump to 2.64. libgfortran/: * configure.ac (AC_PREREQ): Bump to 2.64. boehm-gc/: * configure.ac (AC_PREREQ): Bump to 2.64. gnattools/: * configure.ac (AC_PREREQ): Bump to 2.64. gcc/: * configure.ac (AC_PREREQ): Bump to 2.64. fixincludes/: * configure.ac (AC_PREREQ): Bump to 2.64. libmudflap/: * configure.ac (AC_PREREQ): Bump to 2.64. zlib/: * configure.ac (AC_PREREQ): Bump to 2.64. libffi/: * configure.ac (AC_PREREQ): Bump to 2.64. libcpp/: * configure.ac (AC_PREREQ): Bump to 2.64. libgomp/: * configure.ac (AC_PREREQ): Bump to 2.64. From-SVN: r151059
2009-08-22Regenerate tree using Autoconf 2.64 and Automake 1.11.Ralf Wildenhues4-6711/+4256
config/: * override.m4 (_GCC_AUTOCONF_VERSION): Bump to 2.64. : * configure: Regenerate. intl/: * aclocal.m4: Regenerate. * configure: Regenerate. * config.h.in: Regenerate. libiberty/: * config.in: Regenerate. * configure: Regenerate. boehm-gc/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * include/Makefile.in: Regenerate. * include/gc_config.h.in: Regenerate. fixincludes/: * aclocal.m4: Regenerate. * configure: Regenerate. * config.h.in: Regenerate. gcc/: * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate. libgcc/: * configure: Regenerate. gnattools/: * configure: Regenerate. libada/: * configure: Regenerate. libcpp/: * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate. libdecnumber/: * aclocal.m4: Regenerate. * configure: Regenerate. * config.in: Regenerate. libffi/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * fficonfig.h.in: Regenerate. * include/Makefile.in: Regenerate. * man/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libgfortran/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. libgomp/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libjava/classpath/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. * doc/api/Makefile.in: Regenerate. * examples/Makefile.in: Regenerate. * external/Makefile.in: Regenerate. * external/jsr166/Makefile.in: Regenerate. * external/relaxngDatatype/Makefile.in: Regenerate. * external/sax/Makefile.in: Regenerate. * external/w3c_dom/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * include/config.h.in: Regenerate. * lib/Makefile.in: Regenerate. * native/Makefile.in: Regenerate. * native/fdlibm/Makefile.in: Regenerate. * native/jawt/Makefile.in: Regenerate. * native/jni/Makefile.in: Regenerate. * native/jni/classpath/Makefile.in: Regenerate. * native/jni/gconf-peer/Makefile.in: Regenerate. * native/jni/gstreamer-peer/Makefile.in: Regenerate. * native/jni/gtk-peer/Makefile.in: Regenerate. * native/jni/java-io/Makefile.in: Regenerate. * native/jni/java-lang/Makefile.in: Regenerate. * native/jni/java-math/Makefile.in: Regenerate. * native/jni/java-net/Makefile.in: Regenerate. * native/jni/java-nio/Makefile.in: Regenerate. * native/jni/java-util/Makefile.in: Regenerate. * native/jni/midi-alsa/Makefile.in: Regenerate. * native/jni/midi-dssi/Makefile.in: Regenerate. * native/jni/native-lib/Makefile.in: Regenerate. * native/jni/qt-peer/Makefile.in: Regenerate. * native/jni/xmlj/Makefile.in: Regenerate. * native/plugin/Makefile.in: Regenerate. * resource/Makefile.in: Regenerate. * scripts/Makefile.in: Regenerate. * tools/Makefile.in: Regenerate. libjava/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * include/config.h.in: Regenerate. * testsuite/Makefile.in: Regenerate. libjava/libltdl/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config-h.in: Regenerate. * configure: Regenerate. libmudflap/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libobjc/: * aclocal.m4: Regenerate. * configure: Regenerate. * config.h.in: Regenerate. libssp/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. libstdc++-v3/: * Makefile.in: Regenerate. * acinclude.m4: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * python/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. zlib/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. From-SVN: r151014
2009-08-17re PR preprocessor/41067 (Inconsistency in warnings on invalid \-escapes)Tom Tromey2-1/+6
PR preprocessor/41067: * charset.c (convert_escape): Add missing ":" to error text. From-SVN: r150854
2009-08-04* es.po: Update.Joseph Myers2-5/+9
From-SVN: r150458
2009-07-27cpplib.h (INO_T_CPP): New macro.Douglas B Rupp2-1/+12
* libcpp/include/cpplib.h (INO_T_CPP): New macro. (struct cpp_dir): Use it. From-SVN: r150131
2009-07-25* nl.po: Update.Joseph Myers2-5/+9
From-SVN: r150083
2009-07-23be.po, [...]: Update.Joseph Myers17-1540/+1625
* be.po, ca.po, da.po, de.po, el.po, es.po, fr.po, id.po, ja.po, nl.po, sv.po, tr.po, uk,po, vi.po, zh_CN.po, zh_TW.po: Update. From-SVN: r150025
2009-07-20re PR regression/40800 (libcpp breaks bootstrap)Jerry Quinn3-4/+11
2009-07-20 Jerry Quinn <jlquinn@optonline.net> PR regression/40800 * configure.ac: Use = instead of == for testing ENABLE_BUILD_WITH_CXX. * configure: Rebuild. From-SVN: r149826
2009-07-18directives.c (do_linemarker, do_line): Use CPP_STRING for ignored enum value.Jerry Quinn12-111/+1110
2009-07-17 Jerry Quinn <jlquinn@optonline.net> * directives.c (do_linemarker, do_line): Use CPP_STRING for ignored enum value. * files.c (find_file_in_dir): Add cast from void* to char*. * symtab.c (ht_lookup_with_hash): Add cast from void* to char*. * Makefile.in: (WARN_CFLAGS): Use general and C-specific warnings. (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS, ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER, COMPILER_FLAGS): New. (DEPMODE): Set from CCDEPMODE or CXXDEPMODE. (COMPILE.base): Use COMPILER instead of CC. Use COMPILER_FLAGS instead of ALL_CFLAGS. * configure.ac: Invoke AC_PROG_CXX. Separate C-specific warnings from other warnings. Add -Wc++-compat to C-specific warnings. Check for --enable-build-with-cxx. Set and substitute ENABLE_BUILD_WITH_CXX. Invoke ZW_PROG_COMPILER_DEPENDENCIES according to ENABLE_BUILD_WITH_CXX. Invoke AC_LANG before AC_CHECK_HEADERS. * configure: Rebuild. * include/cpp-id-data.h: Remove extern "C". * include/line-map.h: Likewise. * include/mkdeps.h: Likewise. * include/symtab.h: Likewise. * internal.h: Likewise. From-SVN: r149763
2009-06-23directives.c (parse_include): Add location argument.Manuel López-Ibáñez2-13/+32
2009-06-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org> libcpp/ * directives.c (parse_include): Add location argument. Update all calls. (parse_answer): Likewise. (do_include_common): Error with exact location. (parse_assertion): Likewise. testsuite/ * gcc.dg/cpp/empty-include.c: Update column info. * gcc.dg/cpp/assert2.c: Update column info. From-SVN: r148857
2009-06-18expr.c (num_div_op): Take explicit location.Manuel López-Ibáñez2-6/+15
2009-06-18 Manuel López-Ibáñez <manu@gcc.gnu.org> libcpp/ * expr.c (num_div_op): Take explicit location. testsuite/ * gcc.dg/cpp/arith-3.c: Add column info. From-SVN: r148662
2009-06-17* include/cpplib.h (progname): Don't declare.Ian Lance Taylor2-3/+4
From-SVN: r148627
2009-06-12cpplib.h (struct cpp_options): Add warn_cxx_operator_names field.Ian Lance Taylor4-7/+38
libcpp/: * include/cpplib.h (struct cpp_options): Add warn_cxx_operator_names field. (NODE_WARN_OPERATOR): Define. (struct cpp_hashnode): Increase flags field to 10 bits, decrease type to 6 bits. * init.c (mark_named_operators): Add flags parameter. (cpp_post_options): Pick flags value to pass to mark_named_operators. * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that identifier is an operator name in C++. gcc/: * fold-const.c (fold_unary): Rename local variable and to and_expr. * c-opts.c (c_common_handle_option): For -Wc++-compat set cpp_opts->warn_cxx_operator_names. gcc/testsuite/: * gcc.dg/Wcxx-compat-13.c: New testcase. From-SVN: r148438
2009-06-01diagnostic.c (diagnostic_build_prefix): Always print columns.Aldy Hernandez2-0/+6
gcc/ * diagnostic.c (diagnostic_build_prefix): Always print columns. (diagnostic_report_current_module): Print columns. * common.opt (flag_show_column): Enable by default. gcc/testsuite/ * lib/gcc-dg.exp (dg-bogus): Override dg-bogus. (process-message): Expect column numbers. * gcc.dg/va-arg-2.c: Use line 0 to indicate no column. * gcc.dg/pch/counter-2.c: Same. * gcc.dg/pch/valid-2.c: Same. * gcc.dg/pch/warn-1.c: Same. * gcc.dg/pch/valid-1.c: Same. * gcc.dg/cpp/include2a.c: Handle lack of columns. * gcc.dg/cpp/syshdr.c: Same. * gcc.dg/cpp/19940712-1.c: Same. * gcc.dg/cpp/missing-header-1.c: Same. * gcc.dg/cpp/unc4.c: Remove -fno-show-column. * gcc.dg/cpp/tr-warn3.c: Same. * gcc.dg/cpp/pr29612-2.c: Same. * gcc.dg/cpp/tr-warn4.c: Same. * gcc.dg/cpp/Wtrigraphs.c: Same. * gcc.dg/cpp/poison.c: Same. * gcc.dg/cpp/arith-3.c: Same. * gcc.dg/cpp/sysmac2.c: Same. * gcc.dg/cpp/cpp.exp: Same. * gcc.dg/cpp/tr-warn5.c: Same. * gcc.dg/cpp/include2.c: Same. * gcc.dg/cpp/Wmissingdirs.c: Same. * gcc.dg/cpp/Wmissingdirs.c: Same. * gcc.dg/cpp/tr-warn6.c: Same. * gcc.dg/cpp/Wtrigraphs-2.c: Same. * gcc.dg/cpp/macspace1.c: Same. * gcc.dg/cpp/escape-2.c: Same. * gcc.dg/cpp/assert2.c: Same. * gcc.dg/cpp/undef2.c: Same. * gcc.dg/cpp/macspace2.c: Same. * gcc.dg/cpp/tr-warn1.c: Same. * gcc.dg/cpp/extratokens2.c: Same. * gcc.dg/cpp/strify2.c: Same. * gcc.dg/cpp/Wsignprom.c: Same. * gcc.dg/cpp/redef2.c: Same. * gcc.dg/cpp/trad/trad.exp: Same. * gcc.dg/cpp/arith-1.c: Same. * gcc.dg/cpp/extratokens.c: Same. * gcc.dg/cpp/if-mpar.c: Same. gcc/cp/ * error.c (print_instantiation_partial_context): Print column numbers. libcpp/ * include/line-map.h (LAST_SOURCE_COLUMN): New. From-SVN: r148052
2009-06-01cpp-id-data.h: Add extern "C".Ian Lance Taylor6-0/+50
* include/cpp-id-data.h: Add extern "C". * include/line-map.h: Likewise. * include/mkdeps.h: Likewise. * include/symtab.h: Likewise. * internal.h: Likewise. From-SVN: r148051
2009-05-16alias.c (struct alias_set_entry_d): Rename from struct alias_set_entry.Ian Lance Taylor3-3/+8
gcc/ChangeLog: * alias.c (struct alias_set_entry_d): Rename from struct alias_set_entry. Change all uses. * except.c (struct call_site_record_d): Rename from struct call_site_record. Change all uses. * except.h (struct eh_region_d): Rename from struct eh_region. Change all uses. * gcse.c (struct hash_table_d): Rename from struct hash_table. Change all uses. * graphite.c (struct ivtype_map_elt_d): Rename fromstruct ivtype_map_elt. Change all uses. (struct rename_map_elt_d): Rename fromstruct rename_map_elt. Change all uses. (struct ifsese_d): Rename fromstruct ifsese. Change all uses. * graphite.h (struct name_tree_d): Rename from struct name_tree. Change all uses. (struct sese_d): Rename from struct sese. Change all uses. * omega.h (struct eqn_d): Rename from struct eqn. Change all uses. (struct omega_pb_d): Rename from struct omega_pb. Change all uses. * optabs.h (struct optab_d): Rename from struct optab. Change all uses. (struct convert_optab_d): Rename from struct convert_optab. Change all uses. * tree-pass.h (struct ipa_opt_pass_d): Rename fromstruct ipa_opt_pass. Change all uses. * tree-predcom.c (struct dref_d): Rename from struct dref. Change all uses. * c-decl.c (pushtag): If -Wc++-compat, warn if the tag is already defined as a typedef. (grokdeclarator): If -Wc++-compat, warn if a typedef is already defined as a tag. gcc/cp/ChangeLog: * cp-tree.h (enum cp_lvalue_kind_flags): Rename from cp_lvalue_kind. Change all uses. (enum base_access_flags): Rename from enum base_access. Change all uses. * parser.c (enum cp_parser_flags): Remove enum tag. gcc/testsuite/ChangeLog: * gcc.dg/Wcxx-compat-10.c: New testcase. libcpp/ChangeLog: * include/cpplib.h (enum cpp_builtin_type): Rename from enum builtin_type. Change all uses. From-SVN: r147605
2009-05-13re PR preprocessor/36674 (#include location is offset by one row in errors ↵Manuel López-Ibáñez3-7/+24
from preprocessed files) 2009-05-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR cpp/36674 libcpp/ * directives (do_linemarker): Compensate for the increment in location that occurs when we reach the end of line. * files (_cpp_stack_include): Mention _cpp_find_file in the comment. testsuite/ * gcc.dg/cpp/pr36674.i: New. From-SVN: r147504
2009-05-10c-lex.c (c_lex_with_flags): Expect cpp_hashnode in tok->val.node.node.Joseph Myers6-58/+97
gcc: * c-lex.c (c_lex_with_flags): Expect cpp_hashnode in tok->val.node.node. libcpp: * include/cpplib.h (enum cpp_token_fld_kind): Add CPP_TOKEN_FLD_TOKEN_NO. (struct cpp_macro_arg, struct cpp_identifier): Define. (union cpp_token_u): Use struct cpp_identifier for identifiers. Use struct cpp_macro_arg for macro arguments. Add token_no for CPP_PASTE token numbers. * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma, do_pragma_poison, parse_assertion): Use val.node.node in place of val.node. * expr.c (parse_defined, eval_token): Use val.node.node in place of val.node. * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len, cpp_spell_token, cpp_output_token, _cpp_equiv_tokens, cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in place of val.arg_no. Use val.node.node in place of val.node. * macro.c (replace_args, cpp_get_token, parse_params, lex_expansion_token, create_iso_definition, cpp_macro_definition): Use val.macro_arg.arg_no or val.token_no in place of val.arg_no. Use val.node.node in place of val.node. From-SVN: r147341
2009-05-03charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte UTF-8 sequences.Joseph Myers2-1/+6
libcpp: * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte UTF-8 sequences. gcc/testsuite: * gcc.dg/cpp/utf8-5byte-1.c: New test. From-SVN: r147073
2009-04-25Fix typo in comment in previous commit.Joseph Myers1-1/+1
From-SVN: r146779
2009-04-25re PR preprocessor/39559 (constants too large for intmax_t need pedwarns)Joseph Myers2-1/+26
libcpp: PR preprocessor/39559 * expr.c (cpp_interpret_integer): Use a pedwarn for decimal constants larger than intmax_t in C99 mode. gcc/testsuite: * gcc.dg/c99-intconst-2.c: New test. From-SVN: r146777
2009-04-22hashtab.h: Update GTY annotations to new syntaxTaras Glek5-18/+16
2009-04-21 Taras Glek <tglek@mozilla.com> * include/hashtab.h: Update GTY annotations to new syntax * include/splay-tree.h: Likewise gcc/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * alias.c: Update GTY annotations to new syntax * basic-block.h: Likewise * bitmap.h: Likewise * c-common.h: Likewise * c-decl.c: Likewise * c-parser.c: Likewise * c-pragma.c: Likewise * c-tree.h: Likewise * cfgloop.h: Likewise * cgraph.h: Likewise * config/alpha/alpha.c: Likewise * config/arm/arm.h: Likewise * config/avr/avr.h: Likewise * config/bfin/bfin.c: Likewise * config/cris/cris.c: Likewise * config/darwin.c: Likewise * config/frv/frv.c: Likewise * config/i386/i386.c: Likewise * config/i386/i386.h: Likewise * config/i386/winnt.c: Likewise * config/ia64/ia64.h: Likewise * config/iq2000/iq2000.c: Likewise * config/mips/mips.c: Likewise * config/mmix/mmix.h: Likewise * config/pa/pa.c: Likewise * config/pa/pa.h: Likewise * config/rs6000/rs6000.c: Likewise * config/s390/s390.c: Likewise * config/sparc/sparc.c: Likewise * config/xtensa/xtensa.c: Likewise * cselib.h: Likewise * dbxout.c: Likewise * dwarf2out.c: Likewise * except.c: Likewise * except.h: Likewise * fixed-value.h: Likewise * function.c: Likewise * function.h: Likewise * gimple.h: Likewise * integrate.c: Likewise * optabs.c: Likewise * output.h: Likewise * real.h: Likewise * rtl.h: Likewise * stringpool.c: Likewise * tree-data-ref.c: Likewise * tree-flow.h: Likewise * tree-scalar-evolution.c: Likewise * tree-ssa-address.c: Likewise * tree-ssa-alias.h: Likewise * tree-ssa-operands.h: Likewise * tree.c: Likewise * tree.h: Likewise * varasm.c: Likewise * varray.h: Likewise * vec.h: Likewise * coretypes.h: Do not define GTY macro if it is already defined * doc/gty.texi: Update GTY documentation to new syntax * gengtype-lex.l: Enforce attribute-like syntax for GTY annotations on structs * gengtype-parse.c: Likewise gcc/ada/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * gcc-interface/ada-tree.h: Update GTY annotations to new syntax * gcc-interface/trans.c: Likewise * gcc-interface/utils.c: Likewise gcc/cp/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * cp-tree.h: Update GTY annotations to new syntax * decl.c: Likewise * mangle.c: Likewise * name-lookup.c: Likewise * name-lookup.h: Likewise * parser.c: Likewise * pt.c: Likewise * rtti.c: Likewise * semantics.c: Likewise * typeck2.c: Likewise gcc/fortran/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * f95-lang.c: Update GTY annotations to new syntax * trans-intrinsic.c: Likewise * trans-io.c: Likewise * trans.h: Likewise gcc/java/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * builtins.c: Update GTY annotations to new syntax * decl.c: Likewise * java-tree.h: Likewise * jcf.h: Likewise * lang.c: Likewise gcc/objc/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * objc-act.c: Update GTY annotations to new syntax * objc-act.h: Likewise libcpp/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * include/cpp-id-data.h: Update GTY annotations to new syntax * include/cpplib.h: Likewise * include/line-map.h: Likewise * include/symtab.h: Likewise From-SVN: r146607
2009-04-22* cpplib.pot: Regenerate.Joseph Myers2-189/+173
From-SVN: r146599
2009-04-22re PR c++/14875 (When using 'or' keyword, the error message speaks of a '||' ↵Manuel López-Ibáñez5-8/+51
token) 2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR c++/14875 * c-common.c (c_parse_error): Take a token_flags parameter. Use token_type for the token type instead. Pass token_flags to cpp_type2name. * c-common.h (c_parse_error): Update declaration. * c-parser.c (c_parser_error): Pass 0 as token flags. libcpp/ * lex.c (cpp_type2name): Take a flags parameter. Call cpp_named_operator2name for named operators and cpp_digraph2name for digraphs. (cpp_digraph2name): New. (cpp_spell_token): Use it. (cpp_output_token): Likewise. * include/cpplib.h (cpp_type2name): Update declaration. * init.c (cpp_named_operator2name): New. * internal.h (cpp_named_operator2name): Declare. cp/ * parser.c (cp_parser_error): Pass token->flags to c_parse_error. testsuite/ * g++.dg/parse/parser-pr14875.C: New. * g++.dg/parse/parser-pr14875-2.C: New. * g++.dg/parse/error6.C: Update match string. From-SVN: r146589
2009-04-20re PR c++/13358 (long long and C++ do not mix well)Manuel López-Ibáñez3-4/+13
2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR c++/13358 * doc/invoke.texi (-Wlong-long): Update description. * c-lex (interpret_integer): Only warn if there was no previous overflow and -Wlong-long is enabled. * c-decl.c (declspecs_add_type): Drop redundant flags. * c.opt (Wlong-long): Init to -1. * c-opts.c (sanitize_cpp_opts): Synchronize cpp's warn_long_long and front-end warn_long_long. Wlong-long only depends on other flags if it is uninitialized. * c-parser.c (disable_extension_diagnostics): warn_long_long is the same for CPP and FE. (restore_extension_diagnostics): Likewise. libcpp/ * init.c (cpp_create_reader): Wlong_long is disabled by default. * expr.c (cpp_classify_number): Give different messages for C and C++ front-ends. cp/ * parser.c (cp_parser_check_decl_spec): Drop redundant flags. * error.c (pedwarn_cxx98): New. * cp-tree.h (pedwarn_cxx98): Declare. testsuite/ * gcc.dg/wtr-int-type-1.c: Use two dg-warning to match two messages. Test for "long long" in system headers. * gcc.dg/c99-longlong-2.c: New. * g++.dg/warn/pr13358.C: New. * g++.dg/warn/pr13358-2.C: New. * g++.dg/warn/pr13358-3.C: New. * g++.dg/warn/pr13358-4.C: New. From-SVN: r146459
2009-04-19re PR preprocessor/20078 (Gcc doesn't complain about non-benign macro ↵Joseph Myers5-12/+105
definitions) libcpp: PR preprocessor/20078 * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens field. * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define. (struct cpp_token): Change flags to unsigned short. * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens. (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens. (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE tokens. * macro.c (macro_real_token_count): New. (enter_macro_context, replace_args): Use macro_real_token_count. (create_iso_definition): Record whitespace surrounding and digraph spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH. Set extra_tokens and save CPP_PASTE tokens with arg_no set for multiple consecutive ## tokens. (_cpp_create_definition): Initialize extra_tokens. (cpp_macro_definition): Use macro_real_token_count. gcc/testsuite: * gcc.dg/cpp/paste16.c, gcc.dg/cpp/redef4.c: New tests. From-SVN: r146352
2009-04-18directives.c (parse_include): Pass true to check_eol.Joseph Myers2-1/+5
libcpp: * directives.c (parse_include): Pass true to check_eol. gcc/testsuite: * gcc.dg/cpp/include5.c: New test. From-SVN: r146327
2009-04-18re PR preprocessor/39646 (__FILE__ breaks for empty file name)Joseph Myers4-5/+17
libcpp: PR preprocessor/39646 * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM. * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM. * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in place of LC_RENAME. gcc/testsuite: * gcc.dg/cpp/line8.c: New test. From-SVN: r146319
2009-04-18re PR preprocessor/39647 (Syntax checks in #line not quite right)Joseph Myers2-17/+29
libcpp: PR preprocessor/39647 * directives.c (check_eol): Add parameter expand. (do_undef, parse_include, do_line, do_linemarker, do_ident, do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef, do_else, do_endif, do_assert, do_unassert): All callers changed. Pass true from do_line, false elsewhere. gcc/testsuite: * gcc.dg/cpp/line7.c: New test. From-SVN: r146316
2009-04-12re PR preprocessor/31869 (stringifying empty macros)Joseph Myers2-1/+10
libcpp: PR preprocessor/31869 * macro.c (stringify_arg): Handle NULL source token in padding token where previous padding token did not have source token with preceding whitespace. gcc/testsuite: * gcc.dg/cpp/strify5.c: New test. From-SVN: r145989
2009-04-09Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.Jakub Jelinek27-101/+134
From-SVN: r145841
2009-04-01re PR target/39027 (double floating point suffix of 'd' and 'D' not accepted)Janis Johnson3-5/+23
gcc/ PR c/29027 * c-lex.c (interpret_float): Default (no suffix) is double. libcpp/ PR c/29027 * include/cpplib.h (CPP_N_DEFAULT): Define. * expr.c (interpret_float_suffix): Recognize d or D for double, return new value for default. (cpp_classify_number): Issue pedwarn for use of d or D in suffix. gcc/testsuite/ PR c/29027 * gcc.dg/fltconst-1.c: Don't error for use of d or D in suffix. * gcc.dg/fltconst-2.c: New test. * gcc.dg/fltconst-double-pedantic-1.c: New test. * gcc.dg/fltconst-double-pedantic-2.c: New test. From-SVN: r145422
2009-04-01re PR c/33466 (mixed-case suffix for decimal float constants)Janis Johnson2-62/+81
libcpp/ PR c/33466 * expr.c (interpret_float_suffix): Reject invalid suffix that uses letters from decimal float and fixed-point suffixes. gcc/testsuite PR c/33466 * gcc.dg/cpp/pr33466.c: New test. * gcc.dg/dfp/pr33466.c: New test. * gcc.dg/fixed-point/pr33466.c: New test. From-SVN: r145417
2009-03-31re PR preprocessor/15638 (gcc should have option to treat missing headers as ↵Joseph Myers3-3/+13
fatal) PR preprocessor/15638 gcc: * c-common.c (c_cpp_error): Handle CPP_DL_FATAL. gcc/fortran: * cpp.c (cb_cpp_error): Handle CPP_DL_FATAL. gcc/testsuite: * gcc.dg/cpp/missing-header-1.c: New test. * gcc.dg/cpp/include2.c: Only test #include <>. Expect "compilation terminated" message. * gcc.dg/cpp/include2a.c: New test. Copy of include2.c but only test #include "". * gcc.dg/pch/counter-2.c, gcc.dg/pch/valid-1.c, gcc.dg/pch/valid-2.c, gcc.dg/pch/warn-1.c: Expect "compilation terminated" message. libcpp: * files.c (_cpp_find_file): Call open_file_failed after diagnosing invalid PCH. (open_file_failed): Make error for missing file fatal. * include/cpplib.h (CPP_DL_FATAL): Define. From-SVN: r145341
2009-03-30re PR preprocessor/31932 (cpp -f*-charset and gcj --encoding accept no ↵Sergiy Vyshnevetskiy5-10/+9
values except UTF-8) 2009-03-30 Sergiy Vyshnevetskiy <serg@vostok.net> PR preprocessor/31932: * internal.h: Don't mention HAVE_ICONV_H. * configure, config.in: Rebuild. * configure.ac: Don't check for iconv.h. From-SVN: r145316