Skip to content
Snippets Groups Projects
  1. Apr 18, 2008
    • Kris Van Hees's avatar
      cpp-id-data.h (UC): Was U, conflicts with U... · b6baa67d
      Kris Van Hees authored
      libcpp/ChangeLog:
      2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>
      
      * include/cpp-id-data.h (UC): Was U, conflicts with U... literal.
      * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
      (struct cpp_options): Added uliterals.
      (cpp_interpret_string): Update prototype.
      (cpp_interpret_string_notranslate): Idem.
      * charset.c (init_iconv_desc): New width member in cset_converter.
      (cpp_init_iconv): Add support for char{16,32}_cset_desc.
      (convert_ucn): Idem.
      (emit_numeric_escape): Idem.
      (convert_hex): Idem.
      (convert_oct): Idem.
      (convert_escape): Idem.
      (converter_for_type): New function.
      (cpp_interpret_string): Use converter_for_type, support u and U prefix.
      (cpp_interpret_string_notranslate): Match changed prototype.
      (wide_str_to_charconst): Use converter_for_type.
      (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
      * directives.c (linemarker_dir): Macro U changed to UC.
      (parse_include): Idem.
      (register_pragma_1): Idem.
      (restore_registered_pragmas): Idem.
      (get__Pragma_string): Support CPP_STRING{16,32}.
      * expr.c (eval_token): Support CPP_CHAR{16,32}.
      * init.c (struct lang_flags): Added uliterals.
      (lang_defaults): Idem.
      * internal.h (struct cset_converter) <width>: New field.
      (struct cpp_reader) <char16_cset_desc>: Idem.
      (struct cpp_reader) <char32_cset_desc>: Idem.
      * lex.c (digraph_spellings): Macro U changed to UC.
      (OP, TK): Idem.
      (lex_string): Add support for u'...', U'...', u... and U....
      (_cpp_lex_direct): Idem.
      * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
      (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
      
      gcc/ChangeLog:
      2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>
        
      * c-common.c (CHAR16_TYPE, CHAR32_TYPE): New macros.
      (fname_as_string): Match updated cpp_interpret_string prototype.
      (fix_string_type): Support char16_t* and char32_t*.
      (c_common_nodes_and_builtins): Add char16_t and char32_t (and
      derivative) nodes.  Register as builtin if C++0x.
      (c_parse_error): Support CPP_CHAR{16,32}.
      * c-common.h (RID_CHAR16, RID_CHAR32): New elements. 
      (enum c_tree_index) <CTI_CHAR16_TYPE, CTI_SIGNED_CHAR16_TYPE,
      CTI_UNSIGNED_CHAR16_TYPE, CTI_CHAR32_TYPE, CTI_SIGNED_CHAR32_TYPE,
      CTI_UNSIGNED_CHAR32_TYPE, CTI_CHAR16_ARRAY_TYPE,
      CTI_CHAR32_ARRAY_TYPE>: New elements.
      (char16_type_node, signed_char16_type_node, unsigned_char16_type_node,
      char32_type_node, signed_char32_type_node, char16_array_type_node,
      char32_array_type_node): New defines.
      * c-lex.c (cb_ident): Match updated cpp_interpret_string prototype.
      (c_lex_with_flags): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
      (lex_string): Support CPP_STRING{16,32}, match updated
      cpp_interpret_string and cpp_interpret_string_notranslate prototypes.
      (lex_charconst): Support CPP_CHAR{16,32}.
      * c-parser.c (c_parser_postfix_expression): Support CPP_CHAR{16,32}
      and CPP_STRING{16,32}.
      
      gcc/cp/ChangeLog:
      2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>
      
      * cvt.c (type_promotes_to): Support char16_t and char32_t.
      * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
      char16_t and char32_t.
      * lex.c (reswords): Add char16_t and char32_t (for c++0x).
      * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
      extended builtin type u8char32_t.
      * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
      RID_CHAR{16,32}.
      (cp_lexer_print_token): Support CPP_STRING{16,32}.
      (cp_parser_is_string_literal): Idem.
      (cp_parser_string_literal): Idem.
      (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
      CPP_STRING{16,32}.
      (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}. 
      * tree.c (char_type_p): Support char16_t and char32_t as char types.
      * typeck.c (string_conv_p): Support char16_t and char32_t.
      
      gcc/testsuite/ChangeLog:
      2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>
      
      Tests for char16_t and char32_t support.
      * g++.dg/ext/utf-cvt.C: New
      * g++.dg/ext/utf-cxx0x.C: New
      * g++.dg/ext/utf-cxx98.C: New
      * g++.dg/ext/utf-dflt.C: New
      * g++.dg/ext/utf-gnuxx0x.C: New
      * g++.dg/ext/utf-gnuxx98.C: New
      * g++.dg/ext/utf-mangle.C: New
      * g++.dg/ext/utf-typedef-cxx0x.C: New
      * g++.dg/ext/utf-typedef-
      * g++.dg/ext/utf-typespec.C: New
      * g++.dg/ext/utf16-1.C: New
      * g++.dg/ext/utf16-2.C: New
      * g++.dg/ext/utf16-3.C: New
      * g++.dg/ext/utf16-4.C: New
      * g++.dg/ext/utf32-1.C: New
      * g++.dg/ext/utf32-2.C: New
      * g++.dg/ext/utf32-3.C: New
      * g++.dg/ext/utf32-4.C: New
      * gcc.dg/utf-cvt.c: New
      * gcc.dg/utf-dflt.c: New
      * gcc.dg/utf16-1.c: New
      * gcc.dg/utf16-2.c: New
      * gcc.dg/utf16-3.c: New
      * gcc.dg/utf16-4.c: New
      * gcc.dg/utf32-1.c: New
      * gcc.dg/utf32-2.c: New
      * gcc.dg/utf32-3.c: New
      * gcc.dg/utf32-4.c: New
      
      libiberty/ChangeLog:
      2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>
      
      * testsuite/demangle-expected: Added tests for char16_t and char32_t.
      
      From-SVN: r134438
      b6baa67d
  2. Sep 06, 2007
    • Tom Tromey's avatar
      tree-cfg.c (remove_bb): Only warn if line is non-zero. · 5ffeb913
      Tom Tromey authored
      gcc:
      	* tree-cfg.c (remove_bb): Only warn if line is non-zero.
      	* c-pch.c (c_common_read_pch): Restore current location after
      	reading PCH file.
      	* tree.c (expand_location): Update.
      	(expr_filename): Changed return type.  Unified the two cases.
      	(expr_lineno): Likewise.
      	(annotate_with_file_line): Don't use EXPR_LINENO and EXPR_FILENAME
      	as lvalues.
      	* toplev.c (line_table): Changed type.
      	(general_init): Update.
      	(realloc_for_line_map): New function.
      	(general_init): Allocate line_table using GC.
      	* fix-header.c (line_table): Changed type.
      	(read_scan_file): Update.
      	(read_scan_file): Update.
      	* c-ppoutput.c (maybe_print_line): Update.
      	(print_line): Update.
      	(cb_line_change): Update.
      	(cb_define): Update.
      	(pp_file_change): Update.
      	* c-opts.c (c_common_init_options): Update.
      	(finish_options): Update.
      	(push_command_line_include): Update.
      	* c-lex.c (cb_line_change): Update.
      	(cb_def_pragma): Update.
      	(cb_define): Update.
      	(cb_undef): Update.
      	(c_lex_with_flags): Use cpp_get_token_with_location.
      	* input.h (line_table): Changed type.
      	(location_from_locus): New macro.
      	* tree.h (EXPR_FILENAME): No longer an lvalue.
      	(EXPR_LINENO): Likewise.
      	(expr_locus, set_expr_locus): Declare separately for
      	USE_MAPPED_LOCATION.
      	(expr_filename, expr_lineno): Changed return type.
      	* gimplify.c (tree_to_gimple_tuple): Use SET_EXPR_LOCUS.
      	* cfgexpand.c (expand_gimple_cond_expr): Use location_from_locus.
      	(expand_gimple_basic_block): Likewise.
      	* final.c (final_scan_insn): Use expanded_location.
      gcc/cp:
      	* decl.c (finish_function): Put return's location on line zero of
      	file.
      gcc/fortran:
      	* scanner.c (get_file): Update.
      	(load_file): Update.
      	(gfc_next_char_literal): Use gfc_linebuf_linenum.
      	* f95-lang.c (gfc_init): Update.
      	* gfortran.h (gfc_linebuf_linenum): New macro.
      gcc/java:
      	* lang.c (java_post_options): Update.
      	* jcf-parse.c (set_source_filename): Update.
      	(give_name_to_class): Update.
      	(jcf_parse): Update.
      	(duplicate_class_warning): Update.
      	(parse_class_file): Update.
      	(java_parse_file): Update.
      	* expr.c (expand_byte_code): Update.
      gcc/testsuite:
      	* lib/g++.exp (g++_target_compile): Use -fno-show-column.
      gcc/treelang:
      	* tree1.c (treelang_init): Update.
      	(treelang_parse_file): Update.
      	(treelang_parse_file): Update.
      	(treelang_parse_file): Update.
      	* lex.l: Update.
      	(update_lineno_charno): Likewise.
      libcpp:
      	* internal.h (struct cpp_reader) <invocation_location>: New
      	field.
      	(struct cpp_reader) <set_invocation_location>: Likewise.
      	* init.c (cpp_set_line_map): New function.
      	* line-map.c (linemap_add): Use linemap's allocator.
      	* include/line-map.h (GTY): Define.
      	(line_map_realloc): New typedef.
      	(struct line_map): Mark with GTY.
      	(struct line_maps): Likewise.
      	(struct line_maps) <maps>: Likewise.
      	(struct line_maps) <reallocator>: New field.
      	* include/symtab.h (GTY): Conditionally define.
      	* include/cpplib.h (cpp_set_line_map): Declare.
      	(cpp_get_token_with_location): Declare.
      	* macro.c (cpp_get_token): Set invocation_location on the reader.
      	(cpp_get_token_with_location): New function.
      
      From-SVN: r128190
      5ffeb913
  3. Jul 30, 2007
    • Ollie Wild's avatar
      directives-only.c: New file. · ccfc4c91
      Ollie Wild authored
      	libcpp/
      	* directives-only.c: New file.
      	* internal.h (struct _cpp_dir_only_callbacks): New.
      	(_cpp_preprocess_dir_only): New function.
      	* directives.c (_cpp_handle_directive): Check directives_only before
      	disabling execution of indented directives.
      	* files.c (_cpp_stack_file): Add directives_only check.
      	* include/cpplib.h (struct cpp_options): Add directives_only.
      	(cpp_init_special_builtins): New function.
      	* init.c (cpp_init_special_builtins): New function.
      	(cpp_init_builtins): Move builtin_array initialization to
      	cpp_init_special_builtins.
      	(post_options): Check directives_only before setting
      	pfile->state.prevent_expansion = 1.
      	* macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
      	is expanded inside a directive while -fdirectives-only is enabled.
      	* Makefile.in (libcpp_a_OBJS): Add directives-only.o.
      	(libcpp_a_SOURCES): Add directives-only.c.
      
      	gcc/
      	* c-ppoutput.c (print_lines_directives_only): New function.
      	(scan_translation_unit_directives_only): New function.
      	(preprocess_file): Add call to scan_translation_unit_directives_only.
      	* c-opts.c (c_common_handle_option): Add OPT_fdirectives_only.
      	(sanitize_cpp_opts): Add default flag_dump_macros setting for
      	-fdirectives-only.  Add errors for -fdirectives-only conflict with
      	-Wunused-macros and -traditional.
      	(finish_options): Add builtin macro initialization for
      	-fdirectives-only + -fpreprocessed.
      	* c.opt (fdirectives-only): New.
      	* doc/cppopts.texi (fdirectives-only): New.
      
      	gcc/testsuite/
      	* gcc.dg/cpp/counter-2.c: New test.
      	* gcc.dg/cpp/counter-3.c: New test.
      	* gcc.dg/cpp/dir-only-1.c: New test.
      	* gcc.dg/cpp/dir-only-1.h: New file.
      	* gcc.dg/cpp/dir-only-2.c: New test.
      	* gcc.dg/cpp/dir-only-3.c: New test.
      	* gcc.dg/cpp/dir-only-3a.h: New file.
      	* gcc.dg/cpp/dir-only-3b.h: New file.
      	* gcc.dg/cpp/dir-only-4.c: New test.
      	* gcc.dg/cpp/dir-only-5.c: New test.
      	* gcc.dg/cpp/dir-only-6.c: New test.
      
      From-SVN: r127066
      ccfc4c91
  4. May 24, 2007
    • Ollie Wild's avatar
      macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER. · a702045a
      Ollie Wild authored
      	* macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
      	* pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
      	(cpp_write_pch_state): Save __COUNTER__ state.
      	(cpp_valid_state): Check valid __COUNTER__ state.
      	(cpp_read_state): Read new __COUNTER__ state.
      	* include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
      	* init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
      	* internal.h (struct cpp_reader): Add counter member.
      
      	* gcc.dg/cpp/counter-1.c: New test.
      	* gcc.dg/pch/counter-1.c: New test.
      	* gcc.dg/pch/counter-1.hs: New file.
      	* gcc.dg/pch/counter-2.c: New test.
      	* gcc.dg/pch/counter-2.hs: New file.
      	* gcc.dg/pch/counter-3.c: New test.
      	* gcc.dg/pch/counter-3.hs: New file.
      
      	* doc/cpp.texi (Common Predefined Macros): Add __COUNTER__
      	description.
      
      From-SVN: r125041
      a702045a
  5. Nov 01, 2006
  6. Feb 18, 2006
    • Grigory Zagorodnev's avatar
      cpp.texi (__TIMESTAMP__): Document. · be8ac3e2
      Grigory Zagorodnev authored
      2006-02-17  Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
      
      gcc/ChangeLog:
           * doc/cpp.texi (__TIMESTAMP__): Document.
      
      libcpp/ChangeLog:
           * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
           * files.c (_cpp_get_file_stat): New function.
           * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
           * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
           * internal.h (_cpp_get_file_stat): Prototype.
           (struct cpp_buffer): Add timestamp.
      
      gcc/testsuite/ChangeLog:
           * gcc.dg/cpp/undef3.c: New test.
           * gcc.dg/cpp/trad/builtins2.c: New test.
      
      From-SVN: r111232
      be8ac3e2
  7. Jan 23, 2006
  8. Nov 09, 2005
    • Uros Bizjak's avatar
      re PR c/24101 (Segfault with preprocessed source) · 456b8ce5
      Uros Bizjak authored
      libcpp/
      
      	PR c/24101
      	* init.c (read_original_filename): Temporarily set
      	state.in_directive before calling _cpp_lex_direct for
      	CPP_HASH tokens.
      
      gcc/
      
      	PR c/24101
      	* toplev.c (process_options): Initialize debug_hooks early
      	in case lang_hooks.post_options ends up calling a debug_hook.
      
      gcc/testsuite/
      
      	PR c/24101
      	* gcc.dg/pr24101-1.i, gcc.dg/pr24101-2.i: New tests.
      	* gcc.dg/dg.exp: Run main loop also for *.i files.
      
      From-SVN: r106677
      456b8ce5
  9. Oct 21, 2005
    • James E Wilson's avatar
      Fix bug with -MM -MG. · 6568f34b
      James E Wilson authored
      PR preprocessor/15220
      * files.c (_cpp_find_file): New parameter angle_brackets.  Fix all
      callers.  Pass to open_file_failed.
      (open_file_failed): New parameter angle_brackets.  Fix all callers.
      Use in print_dep assignment.
      * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
      * internal.h (_cpp_find_file): Add new parm to declaration.
      
      From-SVN: r105757
      6568f34b
  10. Sep 20, 2005
    • Joseph Myers's avatar
      c.opt (fextended-identifiers): New. · af15a2fe
      Joseph Myers authored
      gcc:
      	* c.opt (fextended-identifiers): New.
      	* c-opts.c (c_common_handle_option): Handle
      	-fextended-identifiers.
      	* doc/cpp.texi: Update documentation of extended identifiers.
      	* doc/cppopts.texi (-fextended-identifiers): Document.
      
      gcc/testsuite:
      	* g++.dg/cpp/ucnid-1.C, g++.dg/cpp/normalize-1.C,
      	g++.dg/other/ucnid-1.C, gcc.dg/cpp/normalize-1.c,
      	gcc.dg/cpp/normalize-2.c, gcc.dg/cpp/normalize-3.c,
      	gcc.dg/cpp/normalize-4.c, gcc.dg/cpp/ucnid-1.c,
      	gcc.dg/cpp/ucnid-2.c, gcc.dg/cpp/ucnid-3.c, gcc.dg/cpp/ucnid-4.c,
      	gcc.dg/cpp/ucnid-5.c, gcc.dg/cpp/ucnid-7.c,gcc.dg/ucnid-1.c,
      	gcc.dg/ucnid-2.c, gcc.dg/ucnid-3.c, gcc.dg/ucnid-4.c,
      	gcc.dg/ucnid-5.c, gcc.dg/ucnid-6.c: Add -fextended-identifiers.
      	* gcc.dg/cpp/ucnid-8.c: New test.
      
      libcpp:
      	* include/cpplib.h (struct cpp_options): Add extended_identifiers.
      	* init.c (struct lang_flags, lang_defaults): Add
      	extended_identifiers.
      	(cpp_set_lang): Use it.
      	* lex.c (forms_identifier_p): Check extended_identifiers.
      
      From-SVN: r104462
      af15a2fe
  11. Jun 29, 2005
  12. May 28, 2005
    • Gabriel Dos Reis's avatar
      configure.ac: Check declarations for asprintf and vasprintf. · c3f829c1
      Gabriel Dos Reis authored
      	* configure.ac: Check declarations for asprintf and vasprintf.
      	* config.in: Regenerate.
      	* configure: Likewise.
      
      	* charset.c (conversion_loop): Use XRESIZEVEC.
      	(convert_no_conversion): Likewise.
      	(convert_using_iconv): Likewise.
      	(init_iconv_desc): Cast return value of alloca.
      	(cpp_host_to_exec_charset): Use XNEWVEC.
      	(emit_numeric_escape): Use XRESIZEVEC.
      	(cpp_interpret_string): Use XNEWVEC.
      	(cpp_interpret_string): Use XRESIZEVEC.
      	(_cpp_interpret_identifier): Cast return value of alloca.
      	(_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
      	* directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
      	(parse_include): Use XNEWVEC.
      	(insert_pragma_entry): Rename local variable "new" to
      	"new_entry".
      	(save_registered_pragmas): Cast return value of xmemdup.
      	(destringize_and_run): Same for alloca.
      	(parse_assertion): Likewise.
      	(do_assert): Cast allocated storage to proper type.
      	(cpp_define): Likewise.
      	(_cpp_define_builtin): Likewise.
      	(cpp_undef): Likewise.
      	(handle_assertion): Likewise.
      	(cpp_push_buffer): Rename local variable "new" to "new_buffer".
      	* expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
      	(CPP_UMINUS): Likewise.
      	(struct cpp_operator): Rename from struct operator.
      	(_cpp_expand_op_stack): Use XRESIZEVEC.
      	* files.c (pch_open_file): Use XNEWVEC.
      	(pch_open_file): Use XRESIZEVEC.
      	(read_file_guts): Use XNEWVEC and XRESIZEVEC.
      	(dir_name_of_file): Use XNEWVEC.
      	(make_cpp_file): Use XCNEW.
      	(make_cpp_dir): Likewise.
      	(allocate_file_hash_entries): USE XNEWVEC.
      	(cpp_included): Cast return value of htab_find_with_hash.
      	(append_file_to_dir): Use XNEWVEC.
      	(read_filename_string): Likewise. Use XRESIZEVEC too.
      	(read_name_map): Cast return value of alloca.  Use XRESIZEVEC.
      	(remap_filename): Use XNEWVEC.
      	(struct pchf_entry): Move definition out of struct pchf_data.
      	(_cpp_save_file_entries): Use XCNEWVAR.
      	(_cpp_read_file_entries): Use XNEWVAR.
      	* identifiers.c (alloc_node): Use XOBNEW.
      	* init.c (cpp_create_reader): Use XCNEW.
      	(cpp_init_builtins): Cast of b->value to enum builtin_type.
      	(read_original_directory): Cast return value of alloca.
      	* lex.c (add_line_note): Use XRESIZEVEC.
      	(warn_about_normalization): Use XNEWVEC.
      	(_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
      	(new_buff): Use XNEWVEC.
      	* line-map.c (linemap_add): Use XRESIZEVEC.
      	* macro.c (builtin_macro): Cast return value of alloca.
      	(paste_tokens): Likewise.
      	(expand_arg): Use XNEWVEC and XRESIZEVEC.
      	(_cpp_save_parameter): Use XRESIZEVEC.
      	(create_iso_definition): Cast allocated storage to proper type.
      	(_cpp_create_definition): Likewise.
      	(cpp_macro_definition): Use XRESIZEVEC.
      	* makedepend.c (add_clm): Use XNEW.
      	(add_dir): Likewise.
      	* mkdeps.c (munge): Use XNEWVEC.
      	(deps_init): Use XCNEW.
      	(deps_add_target): Use XRESIZEVEC.
      	(deps_add_default_target): Cast return value of alloca.
      	(deps_add_dep): Use XRESIZEVEC.
      	(deps_add_vpath): Likewise.  Use XNEWVEC too.
      	(deps_restore): Likewise.
      	* pch.c (save_idents): Use XNEW and XNEWVEC.
      	(cpp_save_state): Use XNEW.
      	(count_defs): Cast return value of htab_find.
      	(write_defs): Likewise.
      	(cpp_write_pch_deps): Use XNEWVEC.
      	(collect_ht_nodes): Use XRESIZEVEC.
      	(cpp_valid_state): Use XNEWVEC.
      	(save_macros): Use XRESIZEVEC.  Cast return value of xmemdup.
      	* symtab.c (ht_create): Use XCNEW.
      	(ht_lookup_with_hash): Cast return value of obstack_copy0.
      	(ht_expand): Use XCNEWVEC.
      	* system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
      	(bool): Do not define if __cplusplus.
      
      From-SVN: r100295
      c3f829c1
  13. Mar 15, 2005
    • Geoffrey Keating's avatar
      Index: gcc/ChangeLog · 50668cf6
      Geoffrey Keating authored
      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
      50668cf6
  14. Feb 14, 2005
  15. Jan 02, 2005
  16. Sep 24, 2004
    • Zack Weinberg's avatar
      warnings.m4: New file. · 018a4785
      Zack Weinberg authored
      config:
      	* warnings.m4: New file.
      libcpp:
      	* configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
      	programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
      	ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
      	* aclocal.m4, configure: Regenerate.
      	* init.c: Include localedir.h.
      	* Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
      	(DEFS): Delete.
      	(.c.o): Use $(ALL_CFLAGS).
      	(localedir.h, localedir.hs): New rules.
      	(clean): Use rm -rf to remove directories.
      	(distclean): Also delete localedir.h and localedir.hs.
      	(init.o): Update dependencies.
      
      From-SVN: r88074
      018a4785
  17. Jul 23, 2004
  18. Jul 04, 2004
    • Neil Booth's avatar
      re PR preprocessor/16192 (Bug in expression evaluation when operand is missing) · a09d4744
      Neil Booth authored
      	* doc/cpp.texi: Don't document what we do for ill-formed expressions.
      	* doc/cppopts.texi: Clarify processing of command-line defines.
      
      libcpp:
      	PR preprocessor/16192
      	PR preprocessor/15913
      	PR preprocessor/15572
      	* expr.c (_cpp_parse_expr): Handle remaining cases where an
      	expression is missing.
      	* init.c (post_options): Traditional cpp doesn't do // comments.
      
      testsuite:
      	* gcc.dg/cpp/if-mop.c: Two new testcases.
      	* gcc.dg/cpp/trad/comment-3.c: New.
      
      From-SVN: r84080
      a09d4744
  19. Jun 05, 2004
    • Zack Weinberg's avatar
      Makefile.am: Add makedepend. · c6e83800
      Zack Weinberg authored
      libcpp:
      	* Makefile.am: Add makedepend.
      	* Makefile.in, aclocal.m4: Regenerate.
      	* charset.c: Insert a space to avoid a warning.
      	* directives.c: Include mkdeps.h.
      	(_cpp_handle_directive): Reenable macro expander if appropriate.
      	(undefine_macros): Inline body of _cpp_free_definition for speed.
      	Do not call undef callback or _cpp_warn_if_unused_macro.
      	(cpp_get_deps): New interface.
      	* files.c (search_cache): Add pfile argument.  Check for file
      	that would be found by "" or <> search here...
      	(_cpp_find_file): ...not here.  Correct recorded start_dir of
      	files found by directory-of-current-file search that would be
      	found by "" or <> search.
      	* init.c (cpp_add_dependency_target): Delete.
      	* internal.h (struct lexer_state): Add discarding_output flag.
      	* lex.c (lex_identifier): Compute hash function while scanning.
      	* macro.c (cpp_scan_nooutput): Disable macro expansion outside
      	directives.
      	* makedepend.c: New file.
      	* mkdeps.c (struct deps): Add vpath vector.
      	(apply_vpath, deps_add_vpath): New function.
      	(deps_free): Free vpath vector.
      	(deps_add_dep, deps_add_target): Use apply_vpath.
      	* symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
      	(ht_lookup_with_hash): New function.
      	* cpplib.h, mkdeps.h: Update prototypes.
      	* symtab.h: Update prototypes.
      	(HT_HASHSTEP, HT_FINISH): New macros.
      
      gcc:
      	* Makefile.in (MKDEPS_H): New shorthand.
      	(c-opts.o): Update dependencies.
      	* c-opts.c: Include mkdeps.h.
      	(handle_deferred_opts): Use cpp_get_deps and deps_add_target,
      	not cpp_add_dependency_target.
      
      From-SVN: r82654
      c6e83800
  20. May 24, 2004
    • Paolo Bonzini's avatar
      Makefile.def (host_modules): add libcpp. · 4f4e53dd
      Paolo Bonzini authored
      ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* Makefile.def (host_modules): add libcpp.
      	* Makefile.tpl: Add dependencies on and for libcpp.
      	* Makefile.in: Regenerate.
      	* configure.in: Add libcpp host module.
      	* configure: Regenerate.
      
      config/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* acx.m4 (ACX_HEADER_STDBOOL, ACX_HEADER_STRING):
      	From gcc.
      
      gcc/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	Move libcpp to the toplevel.
      	* Makefile.in: Remove references to libcpp files,
      	use CPPLIBS instead of libcpp.a.  Define SYMTAB_H
      	and change hashtable.h to that.
      	* aclocal.m4 (gcc_AC_HEADER_STDBOOL,
      	gcc_AC_HEADER_STRING, gcc_AC_C__BOOL): Remove.
      	* configure.ac (gcc_AC_C__BOOL, HAVE_UCHAR): Remove tests.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      	* c-ppoutput.c: Include ../libcpp/internal.h instead of cpphash.h.
      	* cppcharset.c: Removed.
      	* cpperror.c: Removed.
      	* cppexp.c: Removed.
      	* cppfiles.c: Removed.
      	* cpphash.c: Removed.
      	* cpphash.h: Removed.
      	* cppinit.c: Removed.
      	* cpplex.c: Removed.
      	* cpplib.c: Removed.
      	* cpplib.h: Removed.
      	* cppmacro.c: Removed.
      	* cpppch.c: Removed.
      	* cpptrad.c: Removed.
      	* cppucnid.h: Removed.
      	* cppucnid.pl: Removed.
      	* cppucnid.tab: Removed.
      	* hashtable.c: Removed.
      	* hashtable.h: Removed.
      	* line-map.c: Removed.
      	* line-map.h: Removed.
      	* mkdeps.c: Removed.
      	* mkdeps.h: Removed.
      	* stringpool.h: Include symtab.h instead of hashtable.h.
      	* tree.h: Include symtab.h instead of hashtable.h.
      	* system.h (O_NONBLOCK, O_NOCTTY): Do not define.
      
      gcc/cp/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* Make-lang.in: No need to specify $(LIBCPP).
      
      gcc/java/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
      
      libcpp/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	Moved libcpp from the gcc subdirectory to the toplevel.
      	* Makefile.am: New file.
      	* Makefile.in: Regenerate.
      	* configure.ac: New file.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      	* charset.c: Moved from gcc/cppcharset.c.  Add note about
      	brokenness of input charset detection.  Adjust for change
      	in name of cppucnid.h.
      	* errors.c: Moved from gcc/cpperror.c.  Do not include intl.h.
      	* expr.c: Moved from gcc/cppexp.c.
      	* files.c: Moved from gcc/cppfiles.c.  Do not include intl.h.
      	Remove #define of O_BINARY, it is in system.h.
      	* identifiers.c: Moved from gcc/cpphash.c.
      	* internal.h: Moved from gcc/cpphash.h.  Change header
      	guard name.  All other files adjusted to match name change.
      	* init.c: Moved from gcc/cppinit.c.
      	(init_library) [ENABLE_NLS]: Call bindtextdomain.
      	* lex.c: Moved from gcc/cpplex.c.
      	* directives.c: Moved from gcc/cpplib.c.
      	* macro.c: Moved from gcc/cppmacro.c.
      	* pch.c: Moved from gcc/cpppch.c.  Do not include intl.h.
      	* traditional.c: Moved from gcc/cpptrad.c.
      	* ucnid.h: Moved from gcc/cppucnid.h.  Change header
      	guard name.
      	* ucnid.pl: Moved from gcc/cppucnid.pl.
      	* ucnid.tab: Moved from gcc/cppucnid.tab.  Change header
      	guard name.
      	* symtab.c: Moved from gcc/hashtable.c.
      	* line-map.c: Moved from gcc.  Do not include intl.h.
      	* mkdeps.c: Moved from gcc.
      	* system.h: New file.
      
      libcpp/include/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* cpplib.h: Moved from gcc.  Change header guard name.
      	* line-map.h: Moved from gcc.  Change header guard name.
      	* mkdeps.h: Moved from gcc.  Change header guard name.
      	* symtab.h: Moved from gcc/hashtable.h.  Change header
      	guard name.
      
      libcpp/po/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* be.po: Extracted from gcc/po/be.po.
      	* ca.po: Extracted from gcc/po/ca.po.
      	* da.po: Extracted from gcc/po/da.po.
      	* de.po: Extracted from gcc/po/de.po.
      	* el.po: Extracted from gcc/po/el.po.
      	* es.po: Extracted from gcc/po/es.po.
      	* fr.po: Extracted from gcc/po/fr.po.
      	* ja.po: Extracted from gcc/po/ja.po.
      	* nl.po: Extracted from gcc/po/nl.po.
      	* sv.po: Extracted from gcc/po/sv.po.
      	* tr.po: Extracted from gcc/po/tr.po.
      
      From-SVN: r82199
      4f4e53dd
  21. Apr 23, 2004
    • Per Bothner's avatar
      line-map.h (struct line_maps): New field highest_line. · 500bee0a
      Per Bothner authored
      	* line-map.h (struct line_maps):  New field highest_line.
      	(linemap_position_for_column):  Make non-inline function.
      	(LINEMAP_POSITION_FOR_COLUMN):  New macro.
      	* line-map.c (linemap_init):  Clear highest_line field.
      	(linemap_add):  Set highest_line field.
      	(linemap_line_start):  Minor optimization - use highest_line field.
      	Reduce maximum column hint to 10000.  Update highest_line field.
      	(linemap_position_for_column):  Moved from line-map.h.  Optimize a bit.
      	* cpphash.h (struct cpp_reader):  Remove line field - instead use
      	line_table->highest_line.
      	(saved_line):  Remove unused field.
      	(CPP_INCREMENT_FILE):  Don't do linemap_lookup - just use newest map.
      	Use  line_table's highest_line field instead of cpp_reader's line.
      	* cpplib.c (start_directive):  Likewise use highest_line field.
      	(do_line, do_linemarker):  Likewise just use newest map.
      	(_cpp_do_file_change):  Don't need to set cpp_reader's line field.
      	* cpperror.c (cpp_error):  Likewise use highest_line field.
      	* cppfiles.c (open_file_failed:  Likewise.
      	(cpp_make_system_header):  Likewise use newest map and highest_line.
      	* cppinit.c (cpp_create_reader):  Don't initialize removed field.
      	* cpplex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
      	skip_line_comment, skip_whitespace, _cpp_get_fresh_line,
      	_cpp_lex_direct):  Likewise use highest_line.
      	(_cpp_lex_direct):  Use new LINEMAP_POSITION_FOR_COLUMN macro.
      	* cppmacro.c (_cpp_builtin_macro_text):  Likewise use highest_line,
      	and use newest map.
      	* cpppch.c (cpp_read_state):  Don't save+restore cpp_reader's line.
      	* cpptrad.c (_cpp_overlay_buffer):  Don't save cpp_reader's line.
      	(copy_comment, _cpp_scan_out_logical_line):  Likewise use highest_line.
      
      From-SVN: r81074
      500bee0a
    • Per Bothner's avatar
      re PR preprocessor/15067 (Minor glitch in the source of cpp.) · 3092d0fc
      Per Bothner authored
      	* cppinit.c (cpp_read_main_file):  Return NULL rather than false.
      	Fixes PR preprocessor/15067.
      
      From-SVN: r81068
      3092d0fc
  22. Feb 19, 2004
    • Richard Henderson's avatar
      c-opts.c (warn_variadic_macros): New. · e5b79219
      Richard Henderson authored
              * c-opts.c (warn_variadic_macros): New.
              (c_common_handle_option): Set it.
              (sanitize_cpp_opts): Copy it to cpp_opts.
              * c.opt (Wvariadic-macros): New.
              * cpplib.h (struct cpp_options): Add warn_variadic_macros.
              * cppinit.c (cpp_create_reader): Initialize it.
              * cppmacro.c (parse_params): Check it.
      
      From-SVN: r78125
      e5b79219
  23. Feb 11, 2004
    • Per Bothner's avatar
      Represent column numbers using line-map's source_location. · 12f9df4e
      Per Bothner authored
      	The "next available source_location" is now managed internally by
      	line-maps.c rather than by clients.
      	* line-map.h (struct line_map):  New field column_bits.
      	<from_line>:  Rename field to start_location.
      	(struct line_maps):  New fields highest_location and max_column_hint.
      	(linemap_check_files_exited):  New declaration.
      	(linemap_line_start):  New declaration.
      	(linemap_add):  Remove from_line parameter; use highest_location field.
      	(SOURCE_LINE, LAST_SOURCE_LINE):  Modify to use column_bits.
      	(SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION):  New macros.
      	(CURRENT_LINE_MAP):  Remove macro.
      	(linemap_position_for_column):  New inline function.
      	* line-map.c (linemap_init):  Clear new fields.
      	(linemap_check_files_exited):  New function, extracted from ...
      	(linemap_free):  Use linemap_check_files_exited.
      	(linemap_add):  Remove from_line parameter.  Various updates.
      	(linemap_line_start):  New function.
      	(linemap_lookeup):  Update for new field names.
      	* cpphash.h (struct cpp_reader) <map>:  Field removed.  Because
      	linemap_position_for_column may unpredictably change the current map,
      	it is cleaner and simpler for us to not cache it in cpp_reader.
      	(struct cpp_buffer):  New sysp field.
      	Changed warned_cplusplus_comments and from_stage3 to bitfields.
      	* cppinit.c (cpp_read_min_file):  pfile->map no longer exists.
      	* cpplib.c (do_line, do_linemarker, _cpp_do_file_change):  Get
      	current map using linemap_lookup.
      	(do_linemarker):  Also set buffer's sysp field.
      	(destringize_and_run):  No longer need to decrement current line.
      	* cppfiles.c (_cpp_stack_file):  Set sysp from and in buffer.
      	(search_path_head, open_file_failed):  Use buffer's sysp.
      	(cpp_make_system_header):  Get current map using linemap_lookup.
      	Also set buffer's sysp flag.
      	* cppmacro.c (_cpp_builtin_macro_text):  Likewise use linemap_lookup.
      	* cpphash.h (CPP_INCREMENT_LINE):  New macro.
      	(struct cpp_buffer):  Moved fields saved_cur, saved_rlimit to ...
      	(struct cpp_reader):  ... and adding saved_line_base field.
      	* cpptrad.c (_cpp_overlay_buffer, _cpp_remove_overlay):
      	Update accordingly.  Don't adjust line.
      	(_cpp_scan_out_logical_line):  Use CPP_INCREMENT_LINE.
      	* cpphash.c (CPP_IN_SYSTEM_HEADER):  Replaced macro by ...
      	(cpp_in_system_header):  ... new inline function, using buffer's sysp.
      	* cpperror.c (_cpp_begin_message):  Update to use cpp_in_system_header.
      	* cpplex.c (_cpp_lex_direct):  Likewise.
      	* cppmacro.c (_cpp_builtin_macro_text):  Likewise.
      	* cppmacro.c (_cpp_create_definition):  Use buffer's sysp field.
      	* cpplib.h (struct cpp_token):  Rename line field to src_loc.
      	Remove col field as it is now subsumed by src_loc.
      	* cpperror.c:  Update various field, parameter, and macro names.
      	(print_location):  If col==0, try SOURCE_COLUMN of line.
      	(cpp_error):  Use cur_token's src_loc field, rather than line+col.
      	* cpplib.c (do_diagnostic):  Token's src_loc fields replaces line+col.
      	* cpplex.c (_cpp_process_line_notes, _cpp_lex_direct,
      	_cpp_skip_block_comment):  Use CPP_INCREMENT_LINE.
      	(_cpp_temp_token):  Replace cpp_token's line+col fields by src_loc.
      	(_cpp_get_fresh_line):  Don't need to adjust line for missing newline.
      	(_cpp_lex_direct):  Use linemap_position_for_column.
      	* c-ppoutput.c (maybe_print_line, print_line):  Don't take map
      	parameter.  Instead get it from the line_table global.  Adjust callers.
      	(print):  Remove map field.  Replace line field to src_line.
      	(init_pp_output, account_for_newlines, maybe_print_line):  Adjust.
      	(cb_line_change):  Use SOURCE_COLUMN.  Minor optimizations.
      	(pp_file_change):  Use MAIN_FILE_P since we cannot checked print.map.
      	Use LAST_SOURCE_LINE_LOCATION to "catch up" after #include.
      	* cpptrad.c (copy_comment):  Rename variable.
      	* c-lex.c (map):  Remove static variable, for same reason we removed
      	cpp_reader's map field.
      	(cb_line_change, cb_def_pragma, cb_define, cb_undef):  Hence we need
      	to call linemap_lookup.
      	(cb_line_change):  Token's line field replaced by src_loc.
      	(fe_file_change):  Use MAINFILE_P and LAST_SOURCE_LINE macros.
      	Don't save new_map.
      
      	* cpphash.h, cpperror.c, cpplib.h:  Some renames of fileline to
      	source_location.
      
      From-SVN: r77663
      12f9df4e
  24. Feb 05, 2004
    • Per Bothner's avatar
      Partially revert/redo 2003-10-01 change; fix -fworking-directory. · 8e9ea4d7
      Per Bothner authored
      	* c-ppoutput.c (pp_dir_change):  New function.
      	* c-common.h (pp_dir_change):  New declaration.
      	* cpplib.h (struct cpp_options):  Remove working_directory field.
      	* cppinit.c (cpp_find_main_file, cpp_push_main_file):  Merge back to
      	(cpp_read_main_file):  as before 10-01.  Call _cpp_stack_file.
      	Don't handle -fworking_directory here, but in c_common_post_options.
      	(read_original_directory): Don't back up when done.
      	Don't clear no-longer used working_directory flag.
      	* cpplib.h:  Update declarations to match.
      	* c-lex.c (cb_dir_change):  Move to c-opts.c.
      	(init_c_lex):  Don't set dir_change callback here, since we want
      	to set it even if flag_preprocess_only.
      	* c-opts.c (cb_dir_change):  Function moved from c-lex.c.
      	(c_common_post_options):  Set dir_change callback.
      	Call pp_dir_change if approporiate.
      	(finish_options):  Don't call cpp_find_main_file here.	Hence remove
      	unneeded parameter and result. Do LC_RENAME for <built-in>.
      	(c_common_post_options):  Call cpp_read_main_file here instead.
      	(c_common_init):  Update accordingly.
      	(push_command_line_include):  Don't cpp_push_main_file.
      	Do LC_RENAME rather than LC_LEASE to get back to main file.
      	Compared to pre-10-01 version, inline cpp_rename_to_main_file.
      	(c_common_parse_file):  Call cpp_read_main_file for subsequent main
      	files, but call finish_options for all files.
      	* c-opts.c (sanitize_cpp_opts):  Don't set cpp_opts->working_directory.
      	* fix-header.c (read_scan_file):  Call cpp_read_main_file instead of
      	cpp_find_main_file + cpp_push_main_file.
      	* c-lex.c (fe_file_change):  Don't set main_input_filename here.
      	* opts.c (handle_options):  Only set main_input_filename first time.
      
      From-SVN: r77303
      8e9ea4d7
  25. Feb 02, 2004
    • Eric Christopher's avatar
      [multiple changes] · 16dd5cfe
      Eric Christopher authored
      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
      16dd5cfe
  26. Jan 21, 2004
    • Kazu Hirata's avatar
      alias.c, [...]: Update copyright. · d9221e01
      Kazu Hirata authored
      	* alias.c, basic-block.h, c-common.c, c-common.h,
      	c-cppbuiltin.c, c-opts.c, c-pragma.c, c-pretty-print.c,
      	calls.c, cfg.c, cfgcleanup.c, cfgrtl.c, cgraph.h, collect2.c,
      	combine.c, cppcharset.c, cpphash.h, cppinit.c, cpplib.c,
      	cpplib.h, cppmacro.c, crtstuff.c, cselib.c, cselib.h,
      	defaults.h, df.c, dominance.c, et-forest.c, expmed.c, expr.c,
      	expr.h, fix-header.c, function.h, gcc.c, gcse.c, genattrtab.c,
      	genautomata.c, genconditions.c, genemit.c, genflags.c,
      	gengtype.c, gengtype.h, genopinit.c, genrecog.c, gensupport.c,
      	ggc-zone.c, graph.c, haifa-sched.c, input.h, integrate.c,
      	langhooks-def.h, langhooks.c, langhooks.h, line-map.c,
      	line-map.h, local-alloc.c, optabs.c, optabs.h, postreload.c,
      	ra.h, recog.c, reg-stack.c, regmove.c, reload.c, reorg.c,
      	rtl.c, sched-deps.c, sched-ebb.c, sdbout.c, system.h,
      	target.h, targhooks.c, toplev.h, tree-inline.c, unwind-pe.h,
      	unwind.h, varray.c, varray.h: Update copyright.
      
      From-SVN: r76302
      d9221e01
  27. Jan 20, 2004
    • Per Bothner's avatar
      Move cpp_reader's line_maps field to a shared global. · 50f59cd7
      Per Bothner authored
      	* cpphash.h (cpp_reader):  Rename line_maps field to line_table
      	and change the type to a pointer rather than a struct.
      	* cppinit.c (cpp_push_main_field):  Adjust accordingly.
      	* cpplib.c (do_include_common, _cpp_do_file_change, cpp_get_callbacks):
      	Likewise.
      	* cppfiles.c (validate_pch):  Likewise.
      	* cppmacro.c (_cpp_warn_if_unused_macro, _cpp_builtin_macro_text):
      	Likewise.
      	* cpperror.c (print_location):  Likewise.
      	* cpplib.h (cpp_create_reader):  New line_maps pointer parameter.
      	* cppinit.c (cpp_create_reader):  Handle new parameter.
      	(cpp_destroy):  Don't free line_maps - that's no longer our job.
      	* input.h (line_table):  New variable.
      	* toplev.c (line_table):  Declare variable.
      	(general_init):  Initialize line_table.
      	* c-opts.c (c_common_init_options):  Pass line_table to
      	cpp_create_reader.
      	* fix-header.c (read_scan_file):  New local variable line_table.
      	Initialize, and pass it to cpp_create_reader.
      	* Makefile.in (LIBS, LIBDEPS):  Add libcpp.a.
      	(C_AND_OBJC_OBJS, fix-header):  Remove redundant libcpp.a.
      
      From-SVN: r76198
      50f59cd7
  28. Jan 16, 2004
    • Eric Christopher's avatar
      cppcharset.c (one_iso88591_to_utf8): New function. · cf551fba
      Eric Christopher authored
      2004-01-16  Eric Christopher  <echristo@redhat.com>
      	    Chandrakala Chavva <cchavva@redhat.com>
      
      	* cppcharset.c (one_iso88591_to_utf8): New function.
      	(convert_iso88591_utf8): Ditto. Use.
      	(conversion_tab): Use.
      	(_cpp_input_to_utf8): New function.
      	(_cpp_init_iconv_buffer): Ditto.
      	(_cpp_close_iconv_buffer): Ditto.
      	* cpphash.h: Prototype new functions.
      	(cpp_buffer): Add input_cset_desc.
      	* cppinit.c: Add input_charset default.
      	* cpplib.c (cpp_push_buffer): Support init and
      	close of iconv.
      	* cpplib.h (cpp_options): Add input_charset.
      
      From-SVN: r76000
      cf551fba
  29. Nov 01, 2003
    • John David Anglin's avatar
      re PR preprocessor/12847 (xxx.c:1:20: xxxx.h: No such file or directory) · 0527bc4e
      John David Anglin authored
      	PR preprocessor/12847
      	* cppfiles.c, cppexp.c, cpperror.c, cpplib.h, cpplib.c, cpplex.c,
      	cppinit.c, cpptrad.c, cppmacro.c, fix-header.c, cpppch.c, c-pch.c,
      	c-incpath.c, cppcharset.c (DL_WARNING, DL_WARNING_SYSHDR, DL_PEDWARN,
      	DL_ERROR, DL_ICE, DL_EXTRACT, DL_WARNING_P): Prefix macro names with
      	"CPP_".
      
      From-SVN: r73183
      0527bc4e
  30. Oct 02, 2003
    • Per Bothner's avatar
      cppinit.c (cpp_read_main_file): Split into two functions: Distribute... · 4dc299fb
      Per Bothner authored
      cppinit.c (cpp_read_main_file): Split into two functions: Distribute _cpp_stack_file call over the two functions.
      
      
      	* cppinit.c (cpp_read_main_file):  Split into two functions:
      	Distribute _cpp_stack_file call over the two functions.
      	(cpp_find_main_file):  New function.
      	Don't call _cpp_do_file_change even if working_directory flag set.
      	(cpp_push_main_file):  New function.
      	* cppfiles.c (_cpp_find_failed):  New helper function.
      	(find_file):  Made non-static and renamed to _cpp_find_file.
      	(_cpp_stack_file):  No longer needed.  But note the following.
      	(stack_file):  Made non-static and renamed to _cpp_stack_file.
      	* fix-header.c (cpp_read_main_file):  Replace cpp_read_main_file
      	call with calls to cpp_find_main_file and cpp_push_main_file.
      	(search_path_head):  If there is no current buffer, use main_file.
      	* cpphash.h:  Update function declarations.
      	* cpplib.h:  Update function declarations.
      
      From-SVN: r72014
      4dc299fb
  31. Aug 19, 2003
    • Kazu Hirata's avatar
      c-common.c: Fix comment formatting. · 59e4e217
      Kazu Hirata authored
      	* c-common.c: Fix comment formatting.
      	* c-common.h: Likewise.
      	* c-decl.c: Likewise.
      	* cppinit.c: Likewise.
      	* cpplib.h: Likewise.
      	* emit-rtl.c: Likewise.
      	* input.h: Likewise.
      	* line-map.h: Likewise.
      	* opts.c: Likewise.
      	* opts.h: Likewise.
      	* simplify-rtx.c: Likewise.
      
      From-SVN: r70577
      59e4e217
  32. Aug 11, 2003
  33. Aug 09, 2003
    • Per Bothner's avatar
      cppinit.c (cpp_read_main_file): Split out source-independent initialization to... · 4169c321
      Per Bothner authored
      cppinit.c (cpp_read_main_file): Split out source-independent initialization to separate function ...
      
      
              * cppinit.c (cpp_read_main_file):  Split out source-independent
              initialization to separate function ...
              (cpp_post_options):  New function.
              * cppfiles.c (cpp_stack_file):  Rename public name to ...
              (_cpp_stack_file):  New internal function name.
              * cpplib.h:  Update accordingly.
              * cppinit.c:  (cpp_create_reader):  Initialize cpp_readers line here.
              (cpp_read_main_file):  Don't initialize line here.
              * c-opts.c (c_common_post_options):  Call cpp_post_options.
              (c_common_parse_file):  Call cpp_read_main_file, not cpp_stack_file.
              * fix-header.c (read_scan_file):  Call cpp_post_options.
      
      From-SVN: r70279
      4169c321
  34. Aug 05, 2003
    • Alexandre Oliva's avatar
      c.opt: Introduce -fworking-directory. · b20d9f0c
      Alexandre Oliva authored
      * c.opt: Introduce -fworking-directory.
      * doc/cpp.texi, doc/invoke.texi, doc/cppopts.texi: Document it.
      * c-common.h (flag_working_directory): Declare.
      * c-common.c (flag_working_directory): Define.
      * c-opts.c (c_common_handle_options): Set it.
      (sanitize_cpp_opts): Set...
      * cpplib.h (struct cpp_options): ... working_directory option.
      (struct cpp_callbacks): Add dir_change.
      * cppinit.c (read_original_filename): Call...
      (read_original_directory): New.  Look for # 1 "directory//"
      and process it.
      (cpp_read_main_file): Call dir_change callback if working_directory
      option is set.
      * gcc.c (cpp_unique_options): Pass -g*.
      * c-lex.c (cb_dir_change): New.
      (init_c_lex): Set dir_change callback.
      * toplev.c (src_pwd): New static variable.
      (set_src_pwd, get_src_pwd): New functions.
      * toplev.h (get_src_pwd, set_src_pwd): Declare.
      * dbxout.c (dbxout_init): Call get_src_pwd() instead of getpwd().
      * dwarf2out.c (gen_compile_unit_die): Likewise.
      * dwarfout.c (output_compile_unit_die, dwarfout_init): Likewise.
      
      From-SVN: r70189
      b20d9f0c
  35. Aug 01, 2003
    • Neil Booth's avatar
      Makefile.in: Refine dependencies. · bf42e45b
      Neil Booth authored
      	* Makefile.in: Refine dependencies.
      	* c-opts.c (c_common_handle_option): Do nothing for -Wimport.
      	* c.opt: Update help for -Wimport.
      	* cppfiles.c: Include hashtab.h.  Update comments.
      	(stack_file): Read the file before updating dependencies.
      	(once_only_file_p): Be smarter about marking once-only files.
      	(_cpp_mark_file_once_only): Correct the check for existence on
      	the list.
      	(open_file_failed): Use name not path, which is NULL.
      	* cpphash.h: Don't include hashtab.h.
      	(struct _cpp_file): Remove.
      	(struct cpp_reader): Update.
      	* cppinit.c (cpp_create_reader): Don't initialize warn_import.
      	* cpplib.h (struct cpp_options): Remove warn_import.
      	(cpp_simplify_path): Remove.
      
      From-SVN: r70045
      bf42e45b
  36. Jul 29, 2003
    • Neil Booth's avatar
      Makefile.in (LIBCPP_DEPS): Add HASHTAB_H. · 8f9b4009
      Neil Booth authored
      	* Makefile.in (LIBCPP_DEPS): Add HASHTAB_H.
      	* cppfiles.c: Completely rewritten.
      	* c-incpath.c (free_path, remove_duplicates, heads, tails, add_path):
      	struct cpp_path is now struct cpp_dir.
      	(remove_duplicates): Don't simplify path names.
      	* c-opts.c (c_common_parse_file): cpp_read_next_file renamed
      	cpp_stack_file.
      	* cpphash.h: Include hashtab.h.
      	(_cpp_file): Declare.
      	(struct cpp_buffer): struct include_file is now struct _cpp_file,
      	and struct cpp_path is now struct cpp_dir.  Rename members.
      	(struct cpp_reader): Similarly.  New members once_only_files,
      	file_hash, file_hash_entries, quote_ignores_source_dir,
      	no_search_path, saw_pragma_once.  Remove all_include_files and
      	max_include_len.  Make some members bool.
      	(_cpp_mark_only_only): Renamed from _cpp_never_reread.
      	(_cpp_stack_file): Renamed from _cpp_read_file.
      	(_cpp_stack_include): Renamed from _cpp_execute_include.
      	(_cpp_init_files): Renamed from _cpp_init_includes.
      	(_cpp_cleanup_files): Renamed from _cpp_cleanup_includes.
      	* cppinit.c (cpp_create_reader): Initialize no_search_path.  Update.
      	(cpp_read_next_file): Rename and move to cppfiles.c.
      	(cpp_read_main_file): Update.
      	* cpplib.c (run_directive): Update for renamed members.
      	(do_include_common, _cpp_pop_buffer): Update.
      	(do_import): Undeprecate #import.
      	(do_pragma_once): Undeprecate.  Use _cpp_mark_file_once_only.
      	* cpplib.h: Remove file_name_map_list.
      	(cpp_options): Remove map_list.
      	(cpp_dir): Rename from cpp_path.  New datatype for name_map.
      	(cpp_set_include_chains, cpp_stack_file, cpp_included): Update.
      testsuite:
      	* gcc.dg/cpp/include2.c: Only expect one message.
      
      From-SVN: r69942
      8f9b4009
  37. Jul 22, 2003
    • Zack Weinberg's avatar
      hashtable.c (approx_sqrt): Make static. · a2f7be91
      Zack Weinberg authored
      	* hashtable.c (approx_sqrt): Make static.
      	* hashtable.h: Don't prototype approx_sqrt.
      	* line-map.c (init_line_maps): Rename linemap_init.
      	(free_line_maps): Rename linemap_free.
      	(add_line_map): Rename linemap_add.
      	(lookup_line): Rename linemap_lookup.
      	(print_containing_files): Rename linemap_print_containing_files.
      	* linemap.h: Update to match.
      
      	* cpperror.c, cppinit.c, cpplib.c, cppmacro.c: Update calls to
      	linemap routines to use new names.
      
      From-SVN: r69672
      a2f7be91
  38. Jul 19, 2003
    • Kaveh R. Ghazi's avatar
      alias.c [...]: Remove unnecessary casts. · 703ad42b
      Kaveh R. Ghazi authored
      	* alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.c
      	c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in
      	c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c
      	collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c
      	cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c
      	cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c
      	dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c
      	fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c
      	gcse.c genattr.c genattrtab.c genautomata.c genconditions.c
      	genemit.c genextract.c genoutput.c genrecog.c gensupport.c
      	ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c
      	integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c
      	loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c
      	postreload.c prefix.c print-tree.c protoize.c ra-build.c
      	ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c
      	regmove.c regrename.c reload.c reload1.c reorg.c resource.c
      	sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c
      	simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c
      	tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c
      	varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary
      	casts.
      
      From-SVN: r69587
      703ad42b
  39. Jul 13, 2003
    • Zack Weinberg's avatar
      Makefile.in (LIBCPP_DEPS): Remove coretypes.h and $(TM_H). · 43839642
      Zack Weinberg authored
      	* Makefile.in (LIBCPP_DEPS): Remove coretypes.h and $(TM_H).
      	(hashtable.o, line-map.o, mkdeps.o): Likewise, from dependency
      	list.  Move these all together down by cpplib.
      
      	* cpplib.h: Don't refer to MAX_WCHAR_TYPE_SIZE when determining
      	definition of CPPCHAR_SIGNED_T.
      
      	* cppcharset.c, cpperror.c, cppexp.c, cppfiles.c, cpphash.c, cppinit.c
      	* cpplex.c, cpplib.c, cppmacro.c, cpppch.c, cpptrad.c, hashtable.c
      	* line-map.c, mkdeps.c: Don't include coretypes.h or tm.h.
      
      	* cpphash.c (_cpp_init_hashtable): Don't use gcc_obstack_init.
      	* cppinit.c (cpp_create_reader): Likewise.
      
      	* cpphash.h (scan_out_logical_line): Rename _cpp_scan_out_logical_line.
      	* cpptrad.c: Likewise.  All callers changed.
      	* cpplib.c: All callers changed.
      	* c-ppoutput.c: Replace 'uchar' with 'unsigned char' throughout.
      	* hashtable.h: Define GTY(x) to nothing here too.
      
      From-SVN: r69298
      43839642
Loading