1. 25 Sep, 2003 1 commit
  2. 15 Sep, 2003 1 commit
    • invoke.texi (Warning Options): Describe -Wold-style-definition. · c034f121
      2003-09-15  Andreas Jaeger  <aj@suse.de>
                  Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
      
      	* doc/invoke.texi (Warning Options): Describe -Wold-style-definition.
      	* c-opts.c (c_common_handle_option): Handle OPT_Wold_style_definition.
      	* c-parse.in: Warn about old-style parameter definition.
      	* c-common.c: Define warn_old_style_defintion.
      	* c-common.h: Declare it.
      	* c.opt: Add Wold-style-defintion.
      
      testsuite:
      2003-09-15  Andreas Jaeger  <aj@suse.de>
      
      	* gcc.dg/Wold-style-definition-1.c: New test.
      
      From-SVN: r71400
      Andreas Jaeger committed
  3. 19 Aug, 2003 1 commit
    • PR c++/10538, PR c/5582 · 3390f9c9
      ChangeLog:
              * langhooks-def.h (lhd_decl_uninit): Declare.
              (LANG_HOOKS_DECL_UNINIT): New macro.
              (LANG_HOOKS_INITIALIZER): Adjust.
              * langhooks.h (struct lang_hooks): Add new field
              decl_uninit.
              * langhooks.c (lhd_decl_uninit): Define.
              * c-common.c (c_decl_uninit_1): New function.
              (c_decl_uninit): New function.
              (warn_init_self): Define.
              * c-common.h (c_decl_uninit): Declare.
              (warn_init_self): Declare.
              * c.opt: Introduce -Winit-self.
              * c-opts.c (c_common_handle_options): Set warn_init_self.
              * c-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
              * objc/objc-lang.c  (LANG_HOOKS_DECL_UNINIT): Define.
              * function.c (uninitialized_vars_warning): Call the language hook.
              * doc/invoke.texi: Document -Winit-self.
      
      
      cp/ChangeLog:
              * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
      
      
      testsuite:
              * gcc.dg/uninit-D.c: New Test.
              * gcc.dg/uninit-E.c: New Test.
              * gcc.dg/uninit-F.c: New Test.
              * gcc.dg/uninit-G.c: New Test.
      
      From-SVN: r70574
      Andrew Pinski committed
  4. 05 Aug, 2003 1 commit
    • c.opt: Introduce -fworking-directory. · b20d9f0c
      * 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
      Alexandre Oliva committed
  5. 01 Aug, 2003 1 commit
    • Makefile.in: Refine dependencies. · bf42e45b
      	* 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
      Neil Booth committed
  6. 28 Jul, 2003 1 commit
    • c-parse.in (lineno_stmt_decl_or_labels_ending_decl): Also warn when… · 85617eba
      c-parse.in (lineno_stmt_decl_or_labels_ending_decl): Also warn when warn_declaration_after_statement.
      
      	* c-parse.in (lineno_stmt_decl_or_labels_ending_decl): Also warn
      	when warn_declaration_after_statement.  Call pedwarn_c90, not
      	pedwarn.  Correct message: it's "ISO C90", not "ISO C89".
      	* c-common.c (warn_declaration_after_statement): Define.
      	* c-common.h (warn_declaration_after_statement): Declare.
      	* c.opt (Wdeclaration-after-statement): New.
      	* c-errors.c (pedwarn_c90): New function.
      	* c-opts.c (c_common_handle_option) <case
      	OPT_Wdeclaration_after_statement>: New.
      	* c-tree.h (pedwarn_c90): Declare.
      	* doc/invoke.texi (Option Summary): Document
      	-Wdeclaration-after-statement.
      	(Warning Options): Ditto.
      
      Co-Authored-By: Michael Culbertson <Michael.J.Culbertson@wheaton.edu>
      
      From-SVN: r69899
      Hans-Peter Nilsson committed
  7. 17 Jul, 2003 1 commit
    • c.opt: Document Uncodumented; use it. · f2ac9964
      	* c.opt: Document Uncodumented; use it.  Document ObjC options.
      	* opts.c (print_filtered_help): Skip undocumented switches.
      	* opts.h (CL_UNDOCUMENTED): New.
      	* opts.sh: Handle Undocumented.
      	* toplev.c (documented_lang_options): Prevent its becoming empty.
      f:
      	* lang-options.h: Remove.
      	* lang.opt: Document most options.
      objc:
      	* lang-options.h: Remove.
      
      From-SVN: r69494
      Neil Booth committed
  8. 16 Jul, 2003 1 commit
  9. 15 Jul, 2003 2 commits
    • c.opt: Document more options. · 5a170a05
      	* c.opt: Document more options.
      	* toplev.c (documented_lang_options): Remove all local help strings.
      treelang:
      	* lang-options.h: Remove.
      	* lang.opt: Document some options.  Remove --help.
      	* tree1.c (treelang_handle_option): Remove OPT__help case.
      
      From-SVN: r69423
      Neil Booth committed
    • c-opts.c (print_help): Remove. · 72de27ea
      	* c-opts.c (print_help): Remove.
      	(c_common_handle_option): Don't handle --help.
      	* c.opt: Document some options.
      	(--help): Remove.
      	* opts.c (print_filtered_help): New.
      	(print_help): Use it.
      
      From-SVN: r69383
      Neil Booth committed
  10. 08 Jul, 2003 1 commit
    • Makefile.in: Update. · cf03fd63
      	* Makefile.in: Update.
      	* c-opts.c (c_common_handle_option): opt_text now contains the '-'.
      	* c.opt: Update documentation.
      	* common.opt: Add some help text.
      	* opts.c: Include intl.h.
      	(wrap_help, print_help): New.
      	(find_opt, handle_option, common_handle_option): opt_text now
      	contains the '-'.  Use print_help to output help.
      	* opts.h (struct cl_option): New member "help".
      	* opts.sh: Update to handle help text output and to prepend
      	options with '-'.
      	* toplev.c (display_help): Remove some help text.
      
      From-SVN: r69068
      Neil Booth committed
  11. 05 Jul, 2003 1 commit
    • cpplib.h (CPP_AT_NAME, [...]): New token types. · e6cc3a24
      	* cpplib.h (CPP_AT_NAME, CPP_OBJC_STRING): New token types.
      	(struct cpp_options): Add narrow_charset, wide_charset,
      	bytes_big_endian fields.  Remove EBCDIC field.
      	(cpp_init_iconv, cpp_interpret_string): New external interfaces.
      
      	* cpphash.h: Include <iconv.h> if we have it, otherwise
      	provide a dummy definition of iconv_t.
      	(struct cpp_reader): Add narrow_cset_desc and wide_cset_desc fields.
      	(_cpp_valid_ucn): Update prototype.
      	(_cpp_destroy_iconv): New prototype.
      
      	* doc/cpp.texi: Document character set handling.
      	* doc/cppopts.texi: Document -fexec-charset= and -fexec-wide-charset=.
      	* doc/extend.texi: Delete entire section on multiline strings.
      	Rewrite section on __FUNCTION__ etc now that these are
      	variables in C.
      
      	* cppucnid.tab, cppucnid.pl: New files.
      	* cppucnid.h: New generated file.
      	* cppcharset.c: Include cppucnid.h.  Lots of commentary added.
      	(iconv_open, iconv, iconv_close): Provide dummy definitions
      	if !HAVE_ICONV.
      	(SOURCE_CHARSET, struct strbuf, init_iconv_desc, cpp_init_iconv,
      	_cpp_destroy_iconv, convert_cset, width_to_mask, convert_ucn,
      	emit_numeric_escape, convert_hex, convert_oct, convert_escape,
      	cpp_interpret_string, narrow_str_to_charconst,
      	wide_str_to_charconst): New.
      	(ucn_valid_in_identifier): Use a binary search through the
      	ucnranges table defined in cppucnid.h, not a long chain of if
      	statements.
      	(_cpp_valid_ucn): Add a limit pointer.  Downgrade "universal
      	character names are only valid in C++ and C99" to a warning.
      	Issue the "meaning of \[uU] is different in traditional C"
      	warning here.  Take care not to let iconv see an invalid UCS
      	value if we get a malformed UCN.  Issue an error if we don't
      	have iconv.
      	(cpp_interpret_charconst): Moved here from cpplex.c.  Use
      	cpp_interpret_string to do the heavy lifting.
      
      	* cppinit.c (cpp_create_reader): Initialize bytes_big_endian,
      	narrow_charset, wide_charset fields of options structure.
      	(cpp_destroy): Call _cpp_destroy_iconv.
      	* cpplex.c (forms_identifier_p): Adjust call to _cpp_valid_ucn.
      	(maybe_read_ucn, hex_digit_value, cpp_parse_escape): Delete.
      	(cpp_interpret_charconst): Moved to cppcharset.c.
      	* cpplib.c (dequote_string): Delete.
      	(interpret_string_notranslate): New.
      	(do_line, do_linemarker): Use interpret_string_notranslate.
      
      	* Makefile.in (cppcharset.o): Depend on cppucnid.h.
      
      	* c-common.c (fname_string, combine_strings): Delete.
      	* c-common.h (fname_string, combine_strings): Delete prototypes.
      	* c-lex.c (ignore_escape_flag): Delete.
      	(cb_ident): Use cpp_interpret_string, not lex_string.
      	(get_nonpadding_token): New function.
      	(c_lex): Handle Objective-C @-prefixed identifiers and strings here.
      	Adjust calls to lex_string.  Don't write *value twice.
      	(lex_string): Now handles string constant concatenation.
      	Most of the work handed off to cpp_interpret_string.
      	Call fix_string_type here.
      	* c-parse.in (STRING_FUNC_NAME, VAR_FUNC_NAME): Replace with
      	FUNC_NAME, throughout.
      	(OBJC_STRING): New token type.
      	(primary:STRING): No need to call fix_string_type here.
      	(primary:objc_string): Make that OBJC_STRING.
      	(objc_string nonterminal): Delete.
      	(yylexname): Delete code to handle fake string constants.
      	(yylexstring): Delete entirely.
      	(_yylex): Handle CPP_AT_NAME and CPP_OBJC_STRING.  No need
      	to handle CPP_ATSIGN.
      
      	* c.opt (-fexec-charset=, -fwide-exec-charset=): New options.
      	* c-opts.c (missing_arg, c_common_handle_option): Handle
      	OPT_fexec_charset_ and OPT_fwide_exec_charset_.
      	(c_common_init): Set cpp_opts->bytes_big_endian, not
      	cpp_opts->EBCDIC.  Call cpp_init_iconv.
      	(print_help): Document -fexec-charset= and -fexec-wide-charset=.
      	(TARGET_EBCDIC): Delete default definition.
      
      	* objc/objc-act.c (build_objc_string_object): No need to
      	handle string constant concatenation.
      
      cp:
      	* parser.c (cp_lexer_read_token): No need to handle string
      	constant concatenation.
      
      testsuite:
      	* gcc.c-torture/execute/wchar_t-1.x: New file; XFAIL wchar_t-1.c
      	everywhere.
      	* gcc.dg/concat.c: Concatenation of string constants with
      	__FUNCTION__ / __PRETTY_FUNCTION__ is now a hard error.
      	* gcc.dg/wtr-strcat-1.c: Loosen dg-warning regexp.
      	* gcc.dg/cpp/escape-2.c: Use wide character constants where
      	necessary to avoid multi-character character constant warning.
      	* gcc.dg/cpp/escape.c: Likewise.
      	* gcc.dg/cpp/ucs.c: Likewise.
      	Remove backslashes from dg-bogus comments, as they confuse Tcl.
      	Fix a typo.
      
      libstdc++-v3:
      	* testsuite/22_locale/collate/compare/wchar_t/2.cc
      	* testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc
      	* testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc
      	* testsuite/22_locale/collate/hash/wchar_t/2.cc
      	* testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc
      	* testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc
      	* testsuite/22_locale/collate/transform/wchar_t/2.cc
      	* testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc
      	* testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc:
      	XFAIL on all targets.
      
      From-SVN: r68952
      Zack Weinberg committed
  12. 16 Jun, 2003 1 commit
    • c-opts.c (c_common_handle_option): s/on/value/. · 7b086b11
      	* c-opts.c (c_common_handle_option): s/on/value/.
      	(OPT_fabi_version_, OPT_ftabstop_, OPT_ftemplate_depth_): Use value
      	directly rather than converting the argument.
      	* c.opt: Update docs.  Use UInteger where appropriate.
      	* common.opt: Use UInteger where appropriate.
      	* opts.c (integral_argument): New.
      	(handle_argument): Handle integral arguments, and optional
      	joined arguments.
      	(common_handle_option): Update.
      	* opts.h (CL_MISSING_OK, CL_UINTEGER): New.
      	* opts.sh: Handle JoinedOrMissing and UInteger flags.
      java:
      	* lang.c (java_handle_option): Special-casing of optional
      	joined arguments no longer needed.
      	* lang.opt: Update switches that take optional argument.
      
      From-SVN: r67999
      Neil Booth committed
  13. 15 Jun, 2003 1 commit
    • c-opts.c (lang_flags): Update for new spelling of flags. · be43ab4e
      	* c-opts.c (lang_flags): Update for new spelling of flags.
      	(write_langs): Similarly.
      	* c.opt: Specify languages.
      	* opts.h: Remove languages.
      	* opts.sh: Recognise front-end defined languages.
      ada:
      	* lang.opt: Declare Ada.
      	* misc.c (gnat_init_options): Update.
      doc:
      	* sourcebuild.texi: Update.
      f:
      	* lang.opt: Declare F77.
      java:
      	* lang.opt: Declare Java.
      	* lang.c (java_init_options): Update.
      treelang:
      	* lang.opt: Declare Treelang.  Update.
      	* tree1.c (treelang_init_options): Update.
      
      From-SVN: r67976
      Neil Booth committed
  14. 02 Jun, 2003 1 commit
  15. 01 Jun, 2003 1 commit
  16. 31 May, 2003 1 commit
    • Makefile.in (c-opts.o, [...]): Update dependencies. · fef3106c
      	* Makefile.in (c-opts.o, c-options.h): Update dependencies.
      	* c-opts.c: Include c-options.h and c-options.c.
      	(CL_C_ONLY, CL_OBJC_ONLY, CL_CXX_ONLY, CL_OBJCXX_ONLY):
      	Rename CL_C, CL_OBJC, CL_CXX, CL_OBJCXX.
      	(CL_ARG, CL_ALL, COMMAND_LINE_OPTIONS, struct cl_option,
      	OPT, opt_comp): Remove.
      	(missing_arg, c_common_init_options, c_common_decode_option,
      	write_langs): Update for macro redefinitions and enumeration
      	name changes.
      	* c.opt, opts.sh: New files.
      	* doc/passes.texi: Update.
      
      From-SVN: r67278
      Neil Booth committed