Skip to content
Snippets Groups Projects
  1. Aug 30, 2007
    • Chao-ying Fu's avatar
      expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur, ulr, ullr,... · ac6b1c67
      Chao-ying Fu authored
      expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur, ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
      
      	* expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
      	ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
      	(cpp_classify_number): Support decimal fixed-point constants without
      	exponents.
      	Warn about fixed-point constants when -pedantic.
      	* include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
      	comments to support fixed-point values.
      	(CPP_N_FRACT, CPP_N_ACCUM): Define.
      
      From-SVN: r127940
      ac6b1c67
  2. Jul 03, 2007
    • Uros Bizjak's avatar
      cpplib.h (CPP_N_WIDTH_MD, [...]): Add new constants. · c77cd3d1
      Uros Bizjak authored
      libcpp/ChangeLog:
      
      	* include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
      	Add new constants.
      	* expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
      	suffixes.  Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
      	for 'q' or 'Q' suffixes.
      
      gcc/ChangeLog:
      
      	* targhooks.h (default_mode_for_suffix): New function declaration.
      	* targhooks.c (default_mode_for_suffix): New default target hook.
      	* target.h (struct c): New structure in the targetm struct.
      	(mode_for_suffix): New target hook as part of struct c.
      	target-def.h (TARGET_C_MODE_FOR_SUFFIX): Define as
      	default_mode_for_suffix.
      	(TARGET_C): New define.
      	* c-lex.c: Include "target.h".
      	(interpret_float): Use targetm.c.mode_for_suffix to determine
      	the mode for a given non-standard suffix.
      	Makefile.in (c-lex.o): Depend on $(TARGET_H).
      
      	* config/i386/i386.c (ix86_c_mode_for_suffix): New static function.
      	(TARGET_C_MODE_FOR_SUFFIX): Define to ix86_c_mode_for_suffix.
      
      	* doc/extend.texi (Floating Types): New node.  Document __float80 and
      	__float128 types.  Document 'w', 'W', 'q' and 'Q' suffixes.
      
      testsuite/ChangeLog:
      
      	* gcc.dg/const-float80.c : New test.
      	* gcc.dg/const-float128.c : New test.
      	* gcc.dg/const-float80-ped.c : New test.
      	* gcc.dg/const-float128-ped.c : New test.
      
      From-SVN: r126244
      c77cd3d1
  3. Jun 05, 2007
    • Joerg Wunsch's avatar
      re PR preprocessor/23479 (Implement binary constants with a "0b" prefix) · f7fd775f
      Joerg Wunsch authored
      2007-06-05  Joerg Wunsch  <j.gnu@uriah.heep.sax.de>
      
      	PR preprocessor/23479
      gcc/
      	* doc/extend.texi: Document the 0b-prefixed binary integer
      	constant extension.
      
      libcpp/
      	* expr.c (cpp_classify_number): Implement 0b-prefixed binary
      	integer constants.
      	(append_digit): Likewise.
      	* include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
      	binary integer constants.
      
      testsuite/
      	* testsuite/gcc.dg/binary-constants-1.c: Add test suites for
      	the 0b-prefixed binary integer constants.
      	* testsuite/gcc.dg/binary-constants-2.c: Ditto.
      	* testsuite/gcc.dg/binary-constants-3.c: Ditto.
      	* testsuite/gcc.dg/binary-constants-4.c: Ditto.
      
      From-SVN: r125346
      f7fd775f
  4. May 14, 2007
  5. May 02, 2007
    • Eric Christopher's avatar
      if-div.c: New file. · 22a8a52d
      Eric Christopher authored
      2007-05-02  Eric Christopher  <echristo@apple.com>
      
      	    * gcc.dg/cpp/if-div.c: New file.
      
      2007-05-02  Eric Christopher  <echristo@apple.com>
      
      	    * expr.c (num_div_op): Don't overflow if the result is
      	    zero.
      
      From-SVN: r124358
      22a8a52d
  6. Aug 14, 2006
    • Steve Ellcey's avatar
      re PR c++/28288 (ICE with min/max operator) · b52dbbf8
      Steve Ellcey authored
      	PR c++/28288
      	PR c++/14556
      	* operators.def: Remove <?, ?>, <?=, and >?= operators.
      	* parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
      	(cp_parser_warn_min_max): Remove.
      	* include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
      	(CPP_LAST_EQ): Change.
      	(CPP_LAST_PUNCTUATOR): Change.
      	* expr.c (cpp_operator): Remove MIN and MAX.
      	(reduce): Remove CPP_MIN and CPP_MAX.
      	(num_binary_op): Ditto.
      	* lex.c (_cpp_lex_direct): Ditto.
      	(cpp_avoid_paste): Remove ? as legal symbol after > or <.
      
      From-SVN: r116140
      b52dbbf8
  7. Dec 06, 2005
    • Jon Grimm's avatar
      cpplib.h (CPP_N_DFLOAT): New. · ad6ed77e
      Jon Grimm authored
      
      	* include/cpplib.h (CPP_N_DFLOAT): New.
      	* expr.c (interpret_float_suffix): Identify df, dd, and dl
      	suffixes as decimal floating point constants.
      	(cpp_classify_number): Disallow hexadecimal DFP constants.
      
      Co-Authored-By: default avatarBen Elliston <bje@au.ibm.com>
      
      From-SVN: r108133
      ad6ed77e
  8. Jun 29, 2005
  9. 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
  10. 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
  11. 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
  12. May 13, 2004
  13. Mar 15, 2004
    • Kazu Hirata's avatar
      c-incpath.c, [...]: Update copyright. · ca2b05ba
      Kazu Hirata authored
      gcc/
      	* c-incpath.c, c-incpath.h, c-pch.c, c.opt, cppexp.c,
      	et-forest.h, genattr.c, ggc-none.c, hosthooks-def.h,
      	hosthooks.h, params.h, ra-colorize.c, web.c,
      	config/darwin-c.c, config/alpha/freebsd.h, config/arm/pe.c,
      	config/avr/avr-protos.h, config/avr/avr.md,
      	config/fr30/fr30-protos.h, config/fr30/fr30.md,
      	config/h8300/fixunssfsi.c, config/i386/darwin.h,
      	config/i386/freebsd.h, config/i386/freebsd64.h,
      	config/ia64/hpux.h, config/ia64/unwind-ia64.c,
      	config/ip2k/libgcc.S, config/m32r/xm-m32r.h,
      	config/mmix/mmix-modes.def, config/ns32k/netbsd.h,
      	config/ns32k/ns32k.md, config/pa/pa64-hpux.h,
      	config/pa/pa64-regs.h, config/rs6000/aix41.h,
      	config/rs6000/aix43.h, config/rs6000/host-darwin.c,
      	config/sparc/aout.h, config/sparc/freebsd.h,
      	config/sparc/litecoff.h, config/vax/vax-protos.h,
      	doc/hostconfig.texi, doc/include/gcc-common.texi: Update
      	copyright.
      
      gcc/cp/
      	* cp-lang.c, ptree.c: Update copyright.
      
      From-SVN: r79506
      ca2b05ba
  14. Feb 11, 2004
  15. 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
  16. Aug 03, 2003
  17. 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
  18. 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
  19. Jun 17, 2003
    • Zack Weinberg's avatar
      * cpplib.h, cpphash.h, cppcharset.c, cpperror.c, cppexp.c · 6cf87ca4
      Zack Weinberg authored
      	* cppfiles.c, cpphash.c, cppinit.c, cpplex.c, cpplib.c
      	* cppmacro.c, cpppch.c, cpptrad.c, cppspec.c: Convert to
      	ISO C: new-style function declarations, no need for PARAMS,
      	no special punctuation on indirect function calls, use string
      	constant concatenation where convenient.
      
      From-SVN: r68070
      6cf87ca4
  20. Apr 22, 2003
    • Neil Booth's avatar
      c-lex.c (c_lex): Handle CPP_OTHER differently. · 1067694a
      Neil Booth authored
      	* c-lex.c (c_lex): Handle CPP_OTHER differently.
      	* cppexp.c (_cpp_parse_expr): Similarly.
      	* cpplex.c (SPELL_CHAR): Remove.
      	(_cpp_lex_direct): Stray chars are saved as byte strings.
      	(cpp_spell_token, cpp_output_token, _cpp_equiv_token): Don't
      	handle SPELL_CHAR.
      	(cpp_avoid_paste): Update handling of CPP_OTHER.
      	* cpplib.h: Spell CPP_OTHER like a number.
      	(struct cpp_token): Remove member c.
      	* cppmacro.c (stringify_arg): Update handling of CPP_OTHER.
      
      From-SVN: r65951
      1067694a
  21. Apr 19, 2003
  22. Mar 31, 2003
  23. Dec 19, 2002
    • Kazu Hirata's avatar
      ChangeLog: Follow spelling conventions. · 272d0bee
      Kazu Hirata authored
      	* ChangeLog: Follow spelling conventions.
      	* ChangeLog.2: Likewise.
      	* ChangeLog.4: Likewise.
      	* ChangeLog.5: Likewise.
      	* cppexp.c: Likewise.
      	* df.c: Likewise.
      	* gcov.c: Likewise.
      	* gengtype.c: Likewise.
      	* reload1.c: Likewise.
      	* sched-rgn.c: Likewise.
      	* stmt.c: Likewise.
      	* stor-layout.c: Likewise.
      	* timevar.c: Likewise.
      	* toplev.c: Likewise.
      	* tree.h: Likewise.
      	* varasm.c: Likewise.
      	* config/fr30/fr30.md: Likewise.
      	* config/i386/i386.c: Likewise.
      	* config/ia64/ia64.c: Likewise.
      	* config/pa/pa.c: Likewise.
      
      From-SVN: r60281
      272d0bee
  24. Dec 16, 2002
  25. Nov 29, 2002
  26. Sep 22, 2002
    • Kazu Hirata's avatar
      ChangeLog: Follow spelling conventions. · da7d8304
      Kazu Hirata authored
      	* ChangeLog: Follow spelling conventions.
      	* ChangeLog.0: Likewise.
      	* ChangeLog.1: Likewise.
      	* ChangeLog.2: Likewise.
      	* ChangeLog.3: Likewise.
      	* ChangeLog.4: Likewise.
      	* ChangeLog.5: Likewise.
      	* ChangeLog.6: Likewise.
      	* FSFChangeLog.10: Likewise.
      	* FSFChangeLog.11: Likewise.
      	* alias.c: Likewise.
      	* basic-block.h: Likewise.
      	* c-aux-info.c: Likewise.
      	* c-common.c: Likewise.
      	* c-common.h: Likewise.
      	* c-decl.c: Likewise.
      	* c-format.c: Likewise.
      	* c-semantics.c: Likewise.
      	* c-typeck.c: Likewise.
      	* calls.c: Likewise.
      	* cfganal.c: Likewise.
      	* cfgloop.c: Likewise.
      	* collect2.c: Likewise.
      	* combine.c: Likewise.
      	* conflict.c: Likewise.
      	* cppexp.c: Likewise.
      	* cppfiles.c: Likewise.
      	* cpphash.h: Likewise.
      	* cppinit.c: Likewise.
      	* cpplex.c: Likewise.
      	* cpplib.c: Likewise.
      	* cpplib.h: Likewise.
      	* cppmacro.c: Likewise.
      	* cse.c: Likewise.
      
      From-SVN: r57398
      da7d8304
  27. Sep 16, 2002
    • Kazu Hirata's avatar
      ABOUT-NLS: Follow spelling conventions. · 8d9afc4e
      Kazu Hirata authored
      	* ABOUT-NLS: Follow spelling conventions.
      	* ChangeLog: Likewise.
      	* ChangeLog.1: Likewise.
      	* ChangeLog.2: Likewise.
      	* ChangeLog.3: Likewise.
      	* ChangeLog.4: Likewise.
      	* ChangeLog.5: Likewise.
      	* ChangeLog.6: Likewise.
      	* FSFChangeLog.10: Likewise.
      	* FSFChangeLog.11: Likewise.
      	* c-common.c: Likewise.
      	* c-lex.c: Likewise.
      	* c-objc-common.c: Likewise.
      	* cppexp.c: Likewise.
      	* cppinit.c: Likewise.
      	* cpplex.c: Likewise.
      	* doloop.c: Likewise.
      	* flow.c: Likewise.
      	* function.c: Likewise.
      	* integrate.c: Likewise.
      	* loop.c: Likewise.
      	* reg-stack.c: Likewise.
      	* reload.h: Likewise.
      	* ssa.c: Likewise.
      
      From-SVN: r57188
      8d9afc4e
  28. Aug 02, 2002
    • Zack Weinberg's avatar
      c-common.c (c_common_init): -Wtraditional also implies -Wlong-long. · 56da7207
      Zack Weinberg authored
      	* c-common.c (c_common_init): -Wtraditional also implies -Wlong-long.
      	* cppinit.c (cpp_post_options): Likewise.
      
      	* cppexp.c (cpp_classify_number): Suppress -Wtraditional
      	warning about 'LL' suffix (but not 'ULL' etc) when
      	-Wno-long-long is in effect.
      
      	* cppmacro.c (_cpp_builtin_macro_text) [BT_TIME, BT_DATE]:
      	Check for failing time()/localtime(), issue a warning, and
      	make __TIME__ and __DATE__ expand to fallback strings.
      
      	* doc/cpp.texi, doc/extend.texi: Document behavior of __DATE__
      	and __TIME__ when the date and time cannot be determined.
      
      From-SVN: r55969
      56da7207
  29. Jul 23, 2002
    • Neil Booth's avatar
      cppexp.c (parse_defined): Mark macro used. · a69cbaac
      Neil Booth authored
      	* cppexp.c (parse_defined): Mark macro used.
      	* cpphash.h (struct cpp_macro): New member "used".
      	(_cpp_mark_macro_used, _cpp_warn_if_unused_macro): New.
      	(struct cpp_reader): New member.
      	* cppinit.c (cpp_finish_options): Set first_unused_line.
      	(cpp_finish): Warn of unused macros if requested.
      	(OPT_TABLE): New switches.
      	(cpp_handle_option): Handle them.
      	* cpplib.c (do_undef): Warn if macro unused.
      	(do_ifdef, do_ifndef): Mark macro used.
      	* cpplib.h (struct cpp_options): New member.
      	* cppmacro.c (_cpp_warn_if_unused_macro): New.
      	(enter_macro_context): Mark macro used.
      	(_cpp_create_definition): Mark macro unused; warn if unused
      	when redefined.
      	* cpptrad.c (scan_out_logcial_line, push_replacement_text):
      	Mark macros used.
      	* doc/cppopts.texi: Update.
      testsuite:
      	* gcc.dg/cpp/trad/Wunused.c, gcc.dg/cpp/trad/Wunused.h,
      	gcc.dg/cpp/Wunused.c, gcc.dg/cpp/Wunused.h: New tests.
      
      From-SVN: r55692
      a69cbaac
  30. Jul 20, 2002
    • Neil Booth's avatar
      cppexp.c (struct op): Add token pointer. · 68e65275
      Neil Booth authored
      	* cppexp.c (struct op): Add token pointer.
      	(check_promotion, CHECK_PROMOTION): New.
      	(optab): Update.
      	(_cpp_parse_expr): Update, use token pointer of struct op.
      	(reduce): Warn about change of sign owing to promotion.
      	* cppinit.c (cpp_handle_option): New warning if -Wall.
      	* cpplib.h (struct cpp_options): New member.
      testsuite:
      	* gcc.dg/cpp/Wsignprom.c: New tests.
      
      From-SVN: r55611
      68e65275
  31. Jul 19, 2002
    • Neil Booth's avatar
      cppexp.c (ALWAYS_EVAL): Remove. · 75aef48a
      Neil Booth authored
      	* cppexp.c (ALWAYS_EVAL): Remove.
      	(optab, reduce): Always evaluate.
      	(num_unary_op, num_binary_op, num_div_op): Issue diagnostics
      	only if not skipping evaluation.
      testsuite:
      	* gcc.dg/cpp/expr.c: New tests.
      
      From-SVN: r55595
      75aef48a
  32. Jul 18, 2002
    • Neil Booth's avatar
      cppexp.c (cpp_num_mul): Remove unused parameter. · ad28cff7
      Neil Booth authored
      	* cppexp.c (cpp_num_mul): Remove unused parameter.
      	(UNARY, BINARY, OTHER, binary_handler): Remove.
      	(ALWAYS_EVAL): New.
      	(optab): Update.
      	(reduce): Refactor to a large switch, don't use a function
      	pointer.
      
      From-SVN: r55570
      ad28cff7
  33. Jul 17, 2002
  34. Jul 09, 2002
    • Neil Booth's avatar
      cpperror.c (cpp_error): Default to directive_line within directives here. · cd98faa1
      Neil Booth authored
      	* cpperror.c (cpp_error): Default to directive_line within
      	directives here.
      	* cppexp.c (cpp_interpret_integer): Only use traditional
      	number semantics in directives.
      	* cpplib.c (prepare_directive_trad): Don't reset pfile->line.
      	(do_include_common): Similarly.
      	* cpptrad.c (scan_out_logical_line): Implement accurate
      	quoting of <> in #include.
      	* doc/cpp.texi: Update.
      
      From-SVN: r55347
      cd98faa1
  35. Jun 20, 2002
    • Neil Booth's avatar
      cppexp.c (cpp_interpret_integer): Don't force traditional numbers to be unsigned. · 017acb41
      Neil Booth authored
      	* cppexp.c (cpp_interpret_integer): Don't force traditional
      	numbers to be unsigned.
      	* cpplib.c (prepare_directive_trad): Set line number for
      	diagnostics.
      	* cpptrad.c (scan_out_logical_line): Continue scanning out
      	at start of buffer.
      	* gcc.c (trad_capable_cpp): Use cc1 always.
      f:
      	* lang-specs.h: Use cc1 for traditional preprocessing.
      testsuite:
      	* gcc.dg/cpp/assert_trad1.c, gcc.dg/cpp/assert_trad2.c,
      	gcc.dg/cpp/assert_trad3.c, gcc.dg/cpp/defined_trad.c,
      	gcc.dg/cpp/hash2.c, gcc.dg/cpp/tr-define.c, gcc.dg/cpp/tr-direct.c,
      	gcc.dg/cpp/tr-sign.c, gcc.dg/cpp/tr-str.c, gcc.dg/cpp/uchar-2.c:
      	Remove.
      
      From-SVN: r54856
      017acb41
  36. Jun 07, 2002
  37. Jun 02, 2002
    • Neil Booth's avatar
      c-common.c (c_common_init): Override cpplib's default warn_long_long setting. · ceeedfc1
      Neil Booth authored
      	* c-common.c (c_common_init): Override cpplib's default
      	warn_long_long setting.
      	* c-lex.c (lex_number): Replace with interpret_integer,
      	interpret_float, narrowest_unsigned_type and
      	narrowest_signed_type, taking advantage of the new
      	cpplib functionality.
      	* cpperror.c (_cpp_begin_message): If a warning is turned
      	into an error, avoid printing "warning:".
      	* cppexp.c (cpp_num_sign_extend): New.
      	* cppinit.c: Update comment.
      	* cpplib.h (cpp_num_sign_extend): New.
      	* tree.h: Update comment.
      testsuite:
      	* gcc.dg/wtr-int-type-1.c, gcc.dg/wtr-suffix-1.c,
      	gcc.dg/cpp/paste4.c, gcc.dg/cpp/sysmac2.c:
      	Update for mofified diagnostics.
      	* gcc.dg/c99-intconst-1.c: No longer fail.
      
      From-SVN: r54180
      ceeedfc1
  38. Jun 01, 2002
  39. May 29, 2002
    • Neil Booth's avatar
      cppexp.c (cpp_num): Move to cpplib.h. · cd7ab83f
      Neil Booth authored
      
      2002-05-29  Neil Booth  <neil@daikokuya.demon.co.uk>
      	    Zack Weinberg <zack@codesourcery.com>
      
      	* cppexp.c (cpp_num): Move to cpplib.h.
      	(CPP_ERROR): Remove.
      	(interpret_float_suffix, interpret_int_suffix): New.
      	(struct suffix, vsuf_1, vsuf_2, vsuf_3): Remove.
      	(cpp_classify_number, cpp_interpret_integer): New.
      	(interpret_number): Remove.
      	(eval_token): Update to use new routines.
      	* cpphash.h (cpp_num_part): Move to cpplib.h.
      	* cppinit.c (cpp_post_options): Set warn_long_long.
      	* cpplib.h (struct cpp_options): Add warn_long_long.
      	(cpp_num, cpp_num_part, CPP_N_CATEGORY, CPP_N_INVALID,
      	CPP_N_INTEGER, CPP_N_FLOATING, CPP_N_WIDTH, CPP_N_SMALL,
      	CPP_N_MEDIUM, CPP_N_LARGE, CPP_N_RADIX, CPP_N_DEC, CPP_N_HEX,
      	CPP_N_OCTAL, CPP_N_UNSIGNED, CPP_N_IMAGINARY, cpp_classify_number,
      	cpp_interpret_integer): New.
      testsuite:
      	* gcc.dg/cpp/c++98-pedantic.c, gcc.dg/cpp/c89-pedantic.c,
      	gcc.dg/cpp/c94-pedantic.c, gcc.dg/cpp/gnuc89-pedantic.c,
      	gcc.dg/cpp/if-1.c: Update for modified diagnostics.
      
      Co-Authored-By: default avatarZack Weinberg <zack@codesourcery.com>
      
      From-SVN: r54007
      cd7ab83f
Loading