Commit Graph

51 Commits

Author SHA1 Message Date
Kaveh R. Ghazi 83d2b3b9dc cccp.c: PROTO -> PARAMS.
* cccp.c: PROTO -> PARAMS.
	* cexp.y: Likewise.
	* collect2.c: Likewise.
	* combine.c: Likewise.
	* convert.h: Likewise.
	* cse.c: Likewise.
	* dbxout.c: Likewise.
	* dbxout.h: Likewise.
	* diagnostic.c: Likewise.
	* doprint.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarf2out.h: Likewise.
	* dwarfout.c: Likewise.
	* dwarfout.h: Likewise.
	* dyn-string.h: Likewise.

From-SVN: r31399
2000-01-14 00:46:57 +00:00
Kaveh R. Ghazi 92a438d13c system.h (CTYPE_CONV, [...]): New macros.
* system.h (CTYPE_CONV, TOUPPER, TOLOWER): New macros.  Use
	CTYPE_CONV in all ctype macros.

	* cccp.c (initialize_char_syntax): Use uppercase ctype macro
	from system.h.

	* cexp.y (initialize_random_junk): Likewise.

	* c4x.c (c4x_interrupt_function_p, c4x_handle_pragma): Likewise.

	* i370.c (handle_pragma): Likewise.

	* i370.h (ASM_OUTPUT_LABELREF, ASM_OUTPUT_ASCII): Likewise.

	* v850.c (override_options): Likewise.

	* doprint.c (_doprnt): Likewise.

	* fixinc/fixincl.c (main, quoted_file_exists, extract_quoted_files):
	Likewise.

	* fixinc/server.c (load_data): Likewise.

	* fold-const.c (real_hex_to_f): Likewise.

	* genattr.c (write_upcase, gen_attr): Likewise.

	* genattrtab.c (convert_const_symbol_ref, evaluate_eq_attr,
	write_upcase): Likewise.

	* genemit.c (print_code): Likewise.

	* genopinit.c (gen_insn): Likewise.

	* genpeep.c (print_code): Likewise.

	* genrecog.c (print_code): Likewise.

	* optabs.c (init_libfuncs): Likewise.

ch:

	* lex.c (maybe_downcase, getlc, handle_generic_pragma,
	check_newline): Likewise.

f:

	* bad.c (ffebad_finish): Likewise.

	* fini.c (main): Likewise.

	* intrin.c (ffeintrin_init_0): Likewise.

	* lex.c (ffelex_hash_): Likewise.

	* src.c (ffesrc_init_1): Likewise.

From-SVN: r29463
1999-09-16 22:20:44 +00:00
Linas Vepstas f3ad1f9c0d Linas Vepstas <linas@linas.org>
* c-common.c: Use ISGRAPH, ISLOWER, toupper.
        * c-lex.c, cccp.c, cexp.c, cexp.y, cppexp.c, dwarf2out.c, genattr.c,
        genattrtab.c, genemit.c, genextract.c, genpeep.c, tree.c: Likewise.
        * system.h (IN_CTYPE_DOMAIN): Define to 1 if HOST_EBCDIC.
        * defaults.h (TARGET_ESC): Add default.

From-SVN: r29192
1999-09-07 23:51:23 -07:00
Andreas Schwab a4fe0b0995 cexp.y (yyerror): Call verror to get a usefull error message.
* cexp.y (yyerror): Call verror to get a usefull error message.
        * cexp.c: Rebuilt.

From-SVN: r25811
1999-03-16 14:10:35 -07:00
Kaveh R. Ghazi dff01034e5 c-aux-info.c (data_type, [...]): Qualify a char* with the `const' keyword.
* c-aux-info.c (data_type, affix_data_type, gen_decl,
        gen_formal_list_for_type, gen_formal_list_for_func_def, gen_type):
        Qualify a char* with the `const' keyword.
        * c-common.c (declare_hidden_char_array, add_attribute, if_elt,
        declare_function_name, decl_attributes, format_char_info,
        check_format_info, binary_op_error): Likewise.
        * cexp.y (yyerror, error, pedwarn, warning, token): Likewise.
        * gcse.c (dump_hash_table): Likewise.
        * integrate.c (function_cannot_inline_p): Likewise
        * optabs.c: Include insn-config.h earlier.
        (init_libfuncs, init_integral_libfuncs, init_floating_libfuncs):
        Qualify a char* with the `const' keyword.
        * real.c (asctoe24, asctoe53, asctoe64, asctoe113, asctoe,
        asctoeg, mtherr, ereal_atof): Likewise.
        * real.h (ereal_atof): Likewise.
        * sbitmap.c (dump_sbitmap_vector): Likewise.
        * sbitmap.h (dump_sbitmap_vector): Likewise.
        * stmt.c (nesting, n_occurrences, expand_start_case): Likewise.
        * toplev.c (rest_of_compilation): Likewise.
        * tree.h (function_cannot_inline_p, expand_start_case): Likewise.

From-SVN: r25614
1999-03-06 05:34:26 +00:00
Kaveh R. Ghazi bd86d7e2b2 cccp.c: Don't define HOST_WIDE_INT.
* cccp.c: Don't define HOST_WIDE_INT.  Replace all occurrences of
        WIDE_INT with WIDEST_INT.
        * cexp.y: Likewise.
        Don't define unsigned_HOST_WIDE_INT, CHAR_BIT or
        HOST_BITS_PER_WIDE_INT.  Replace occurrences of PRINTF_PROTO_1()
        style with PVPROTO() ATTRIBUTE_PRINTF_1 style macros.  Replace
        occurrences of "unsigned_HOST" with "unsigned HOST".  Provide a
        definition of variable `c89' when compiling a test binary and set it.
        * system.h: Don't define the PRINTF_PROTO_* macros.

From-SVN: r25217
1999-02-15 11:58:09 +00:00
Nathan Sidwell 38d9d13089 system.h (_, N_): Remove dummy i18n macros.
* system.h (_, N_): Remove dummy i18n macros.
        * protoize.c: Move inclusion of intl.h to after system.h.
        * cexp.y: Include intl.h.
        * cexp.c: Rebuilt.

From-SVN: r25117
1999-02-09 13:30:46 -07:00
Jeffrey A Law ab87f8c8d1 Merge in gcc2 snapshot 19980929. See gcc/ChangeLog and gcc/FSFChangeLog for
details.

From-SVN: r24879
1999-01-26 18:43:17 -07:00
Kaveh R. Ghazi 2778b98d90 system.h: Include libiberty.h.
* system.h: Include libiberty.h.
        * c-aux-info.c: Remove prototypes for concat/concat3.  Change
        function `concat' from fixed parameters to variable parameters,
        as is done in libiberty.  All callers of concat/concat3
        changed to use the new `concat' with variable args.
        * cccp.c: Remove things made redundant by libiberty.h and/or
        conform to libiberty standards.
        * cexp.y: Likewise.
        * collect2.c: Likewise.
        * config/1750a/1750a.h: Likewise.
        * cppalloc.c: Likewise.
        * cppexp.c: Likewise.
        * cppfiles.c: Likewise.
        * cpphash.c: Likewise.
        * cpplib.c: Likewise.
        * dyn-string.c: Likewise.
        * fix-header.c: Likewise.
        * gcc.c: Likewise.
        * gcov.c: Likewise.
        * genattr.c: Likewise.
        * genattrtab.c: Likewise.
        * gencheck.c: Likewise.
        * gencodes.c: Likewise.
        * genconfig.c: Likewise.
        * genemit.c: Likewise.
        * genextract.c: Likewise.
        * genflags.c: Likewise.
        * gengenrtl.c: Likewise.
        * genopinit.c: Likewise.
        * genoutput.c: Likewise.
        * genpeep.c: Likewise.
        * genrecog.c: Likewise.
        * getpwd.c: Likewise.
        * halfpic.c: Likewise.
        * hash.c: Likewise.
        * mips-tdump.c: Likewise.  Wrap malloc/realloc/calloc prototypes
        in NEED_DECLARATION_* macros.
        * mips-tfile.c: Remove things made redundant by libiberty.h and/or
        conform to libiberty standards.
        (fatal): Fix const-ification of variable `format' in
        !ANSI_PROTOTYPES case.
        * prefix.c: Remove things made redundant by libiberty.h and/or
        conform to libiberty standards.
        * print-rtl.c: Rename variable `spaces' to `xspaces' to avoid
        conflicting with function `spaces' from libiberty.
        * profile.c: Remove things made redundant by libiberty.h and/or
        conform to libiberty standards.
        * protoize.c: Likewise.
        * rtl.h: Likewise.
        * scan.h: Likewise.
        * tlink.c: Likewise.
        * toplev.c: Likewise.
        * toplev.h: Likewise.
        * tree.h: Likewise.

From-SVN: r23931
1998-11-27 10:09:17 +00:00
Kaveh R. Ghazi 5148a72b33 gansidecl.h: Prepend a "G" to the macro wrapping this file (to distinguish it from the macro...
* gansidecl.h: Prepend a "G" to the macro wrapping this file
        (to distinguish it from the macro wrapping ansidecl.h.)
        Include libiberty's ansidecl.h.  Remove all redundant definitions.
        Define the PROTO() style macros in terms of the PARAMS() ones.
        * calls.c (emit_library_call): Switch on ANSI_PROTOTYPES, not
        __STDC__, when deciding whether to use ANSI variable args.
        (emit_library_call_value): Likewise.
        * cccp.c (error): Likewise.
        (warning): Likewise.
        (error_with_line): Likewise.
        (warning_with_line): Likewise.
        (pedwarn): Likewise.
        (pedwarn_with_line): Likewise.
        (pedwarn_with_file_and_line): Likewise.
        (fatal): Likewise.
        * cexp.y (error): Likewise.
        (pedwarn): Likewise.
        (warning): Likewise.
        * collect2.c (fatal_perror): Likewise.
        (fatal): Likewise.
        (error): Likewise.
        * combine.c (gen_rtx_combine): Likewise.
        * cpperror.c (cpp_message): Likewise.
        (cpp_fatal): Likewise.
        * cpplib.c (cpp_error): Likewise.
        (cpp_warning): Likewise.
        (cpp_pedwarn): Likewise.
        (cpp_error_with_line): Likewise.
        (cpp_warning_with_line): Likewise.
        (cpp_pedwarn_with_line): Likewise.
        (cpp_pedwarn_with_file_and_line): Likewise.
        * cpplib.h: Don't define PARAMS() macro.
        * demangle.h: Likewise.
        * doprint.c (checkit): Switch on ANSI_PROTOTYPES, not __STDC__,
        when deciding whether to use ANSI variable args.
        * emit-rtl.c (gen_rtx): Likewise.
        (gen_rtvec): Likewise.
        * final.c (asm_fprintf): Likewise.
        * fix-header.c (cpp_message): Likewise.
        (fatal): Likewise.
        (cpp_fatal): Likewise.
        * gcc.c (concat): Likewise.
        (fatal): Likewise.
        (error): Likewise.
        * genattr.c (fatal): Likewise.
        * genattrtab.c (attr_rtx): Likewise.
        (attr_printf): Likewise.
        (fatal): Likewise.
        * gencodes.c (fatal): Likewise.
        * genconfig.c (fatal): Likewise.
        * genemit.c (fatal): Likewise.
        * genextract.c (fatal): Likewise.
        * genflags.c (fatal): Likewise.
        * genopinit.c (fatal): Likewise.
        * genoutput.c (fatal): Likewise.
        (error): Likewise.
        * genpeep.c (fatal): Likewise.
        * genrecog.c (fatal): Likewise.
        * halfpic.h: Switch on ANSI_PROTOTYPES, not __STDC__, when
        deciding whether to declare `tree_node' and `rtx_def'.
        * hash.h: Don't define stuff we get from gansidecl.h.
        * mips-tfile.c: Likewise.  Define __proto() in terms of PARAMS().
        (fatal): Switch on ANSI_PROTOTYPES, not __STDC__, when deciding
        whether to use ANSI variable args.
        (error): Likewise.
        * prefix.c (concat): Likewise.
        * scan.h: Likewise.
        * system.h: Likewise.
        * toplev.c (error_with_file_and_line): Likewise.
        (error_with_decl): Likewise.
        (error_for_asm): Likewise.
        (error): Likewise.
        (fatal): Likewise.
        (warning_with_file_and_line): Likewise.
        (warning_with_decl): Likewise.
        (warning_for_asm): Likewise.
        (warning): Likewise.
        (pedwarn): Likewise.
        (pedwarn_with_decl): Likewise.
        (pedwarn_with_file_and_line): Likewise.
        (sorry): Likewise.
        (really_sorry): Likewise.
        * toplev.h: Switch on ANSI_PROTOTYPES, not __STDC__, when deciding
        whether to declare `tree_node' and `rtx_def'.
        * tree.c (build): Switch on ANSI_PROTOTYPES, not __STDC__, when
        deciding whether to use ANSI variable args.
        (build_nt): Likewise.
        (build_parse_node): Likewise.

From-SVN: r23577
1998-11-08 15:10:24 +00:00
Kaveh R. Ghazi 0056a9b5cf configure.in (host_xm_file, [...]): Arrange to include gansidecl.h in {ht}config.h & tm.h just before the config/...
* configure.in (host_xm_file, build_xm_file, xm_file, tm_file):
        Arrange to include gansidecl.h in {ht}config.h & tm.h just
        before the config/ directory headers.
        (tm_file_list, host_xm_file_list, build_xm_file_list): Handle
        gansidecl.h in the list of dependencies.
        * Makefile.in (RTL_BASE_H): Don't depend on gansidecl.h.
        (TREE_H, DEMANGLE_H, RECOG_H, REGS_H, libgcc2.a, stmp-multilib,
        mbchar.o, collect2.o, pexecute.o, vfprintf.o, splay-tree.o, gcc.o,
        gencheck.o, choose-temp.o, mkstemp.o, mkstemp.o, prefix.o,
        dyn-string.o, cexp.o, cccp.o, cppmain.o, cpplib.o, cpperror.o,
        cppexp.o, cppfiles.o, cpphash.o, cppalloc.o, scan-decls.o):
        Likewise.
        * cccp.c: Don't include gansidecl.h.
        * cexp.y: Likewise.
        * collect2.c: Likewise.
        * config/c4x/c4x.c: Likewise.
        * config/v850/v850.h: Likewise.
        * cppalloc.c: Likewise.
        * cpperror.c: Likewise.
        * cppexp.c: Likewise.
        * cppfiles.c: Likewise.
        * cpphash.c: Likewise.
        * cpplib.c: Likewise.
        * cppmain.c: Likewise.
        * cppulp.c: Likewise.
        * demangle.h: Likewise.
        * doprint.c: Likewise.
        * dyn-string.c: Likewise.
        * eh-common.h: Likewise.
        * fix-header.c: Likewise.
        * frame.c: Likewise.
        * gcc.c: Likewise.
        * gcov.c: Likewise.
        * gen-protos.c: Likewise.
        * gencheck.c: Likewise.
        * halfpic.h: Likewise.
        * hash.c: Likewise.
        * machmode.h: Likewise.
        * mbchar.c: Likewise.
        * prefix.c: Likewise.
        * protoize.c: Likewise.
        * recog.h: Likewise.
        * rtl.h: Likewise.
        * scan-decls.c: Likewise.
        * tree.h: Likewise.
        * varray.h: Likewise.

From-SVN: r23558
1998-11-07 13:00:46 +00:00
Kaveh R. Ghazi 789f983ab1 system.h: Include stdarg.h/varargs.h...
* system.h: Include stdarg.h/varargs.h, make sure they are ordered
        correctly with regards to stdio.h.
        * calls.c: Remove stdarg.h/varargs.h.
        * cccp.c: Likewise.
        * cexp.y: Likewise.
        * combine.c: Likewise.
        * cpperror.c: Likewise.
        * cpplib.c: Likewise.
        * cpplib.h: Likewise.
        * doprint.c: Likewise.
        * emit-rtl.c: Likewise.
        * final.c: Likewise.
        * fix-header.c: Likewise.
        * gcc.c: Likewise.
        * genattr.c: Likewise.
        * genattrtab.c: Likewise.
        * gencodes.c: Likewise.
        * genconfig.c: Likewise.
        * genemit.c: Likewise.
        * genextract.c: Likewise.
        * genflags.c: Likewise.
        * genopinit.c: Likewise.
        * genoutput.c: Likewise.
        * genpeep.c: Likewise.
        * genrecog.c: Likewise.
        * mips-tfile.c: Likewise.
        * prefix.c: Likewise.
        * protoize.c: Likewise.
        * regmove.c: Likewise.
        * toplev.c: Likewise.
        * tree.c: Likewise.
        * cp/errfn.c: Remove stdarg.h/varargs.h.
        * cp/tree.c: Likewise.

From-SVN: r21997
1998-08-26 08:11:47 +00:00
Dave Brolley 56f48ce976 configure.in (enable_c_mbchar): New configure option.
Mon Jul 20 16:16:38 1998  Dave Brolley  <brolley@cygnus.com>
	* configure.in (enable_c_mbchar): New configure option.
	(extra_cpp_objs): Always available now.
	* cexp.y (mbchar.h): #include it.
	(yylex): Handle Multibyte characters in character literals.
	* cccp.c (mbchar.h): #include it.
	(main): Set character set based on LANG environment variable.
	(rescan): Handle multibyte characters in comments.
	(skip_if_group): See above.
	(validate_else): See above.
	(skip_to_end_of_comment): See above.
	(macarg1): See above.
	(discard_comments): See above.
	(rescan): Handle multibyte characters in string and character literals.
	(collect_expansion): See above.
	(skip_quoted_string): See above.
	(macroexpand): See above.
	(macarg1): See above.
	(discard_comments): See above.
	(change_newlines): See above.
	* c-lex.c (mbchar.h): #include it.
	(GET_ENVIRONMENT): New macro.
	(init_lex): Set character set based on LANG environment variable.
	(yylex): Handle multibyte characters in character literals.
	(yylex): Handle multibyte characters in string literals.
	* Makefile.in (mbchar.o): New target.
	(cccp$(exeext)): @extra_cpp_objs@ is always available.
	(cppmain$(exeext)): @extra_cpp_objs@ is always available.
	* mbchar.[ch]: New files for multibyte character handling.

From-SVN: r21303
1998-07-20 09:35:38 -04:00
Kaveh R. Ghazi 76b4b31ead Handle missing vfprintf() & _doprnt() functions with linked in modules,
plus do some general cleanup of variable argument handling.
        * aclocal.m4 (GCC_FUNC_VFPRINTF_DOPRNT): New macro.
        * configure.in: Add a call to GCC_FUNC_VFPRINTF_DOPRNT.
        (AC_CHECK_HEADERS): Remove unused check for varargs.h,sys/varargs.h.
        (AC_CHECK_FUNCS): Remove unused check for vprintf.
        * Makefile.in: Add support for linking in vfprintf.c and doprint.c.
        (cccp.o): Depend on gansidecl.h.
        (cexp.o): Likewise.
        * cccp.c: Convert from using PRINTF_ALIST/PRINTF_DCL to VPROTO as
        per the rest of gcc source.
        * cexp.y: Likewise.  Include gansidecl.h and remove all code made
        redundant.
        * cccp.c: Remove checks for HAVE_VPRINTF and the associated code
        used when vfprintf is missing.
        * cexp.y: Likewise.
        * gcc.c: Likewise.
        * genattrtab.c: Likewise.
        * mips-tfile.c: Likewise.
        * toplev.c: Likewise.
        * vfprintf.c: New file.
        * doprint.c: Likewise.

From-SVN: r19610
1998-05-07 11:44:09 +00:00
Kaveh R. Ghazi 944fc8abef More system.h cutover patches:
* c-parse.in: Include system.h, and remove stuff now made redundant.
        * cccp.c: Likewise.
        * cexp.y: Likewise.
        * protoize.c: Likewise.  Properly check for cpp stringification.
        * Makefile.in (c-parse.o, cccp.o, cexp.o, protoize.o, unprotoize.o):
        Depend on system.h.
        * objc/Make-lang.in (objc-parse.o): Likewise.

From-SVN: r19020
1998-04-06 14:01:33 +00:00
Jeff Law 31031eddac dummy commit before merge
From-SVN: r18980
1998-04-03 09:37:26 -07:00
Richard Kenner 69375a37de cexp.y (warn_undef): New variable.
(exp): Optionally warn about undefined identifiers that evaluate to 0.

From-SVN: r13877
1997-04-13 12:49:45 -04:00
Richard Kenner 21c24d8861 (parse_number, yylex), cccp.c (rescan), cpplib.c
(parse_number, yylex), cccp.c (rescan), cpplib.c
(cpp_get_token): Unless -lang-c89 is specified, allow C9X-style
hexadecimal floating-point numbers as preprocessor numbers.

From-SVN: r13746
1997-03-19 16:57:58 -05:00
Richard Kenner 1a4a238db9 (parse_number): Invalid integer constants are errors if pedantic.
(yylex): Invalid multibyte characters are errors if pedantic.

From-SVN: r13725
1997-03-17 17:07:46 -05:00
Richard Kenner 422c6060b6 (parse_c_expression): Don't check for null lexptr or *lexptr == 0.
(parse_c_expression): Don't check for null lexptr or *lexptr == 0.  If
yyparse returns nonzero value, abort.

From-SVN: r13655
1997-02-16 07:46:24 -05:00
Richard Kenner a5ac8bef00 (yylex): Use is_space, not is_hor_space, to find keyword end.
(is_space): New decl.
(is_hor_space): Removed.

From-SVN: r13654
1997-02-16 07:43:33 -05:00
Richard Kenner 883dc89ca6 #define __attribute__ to be null if compiling with GCC older than 2.7,
not 2.6.

From-SVN: r13522
1997-01-19 15:37:37 -05:00
Richard Kenner 095f66970e (PRINTF_PROTO): Use __printf__ in __attribute__, not printf.
From-SVN: r13362
1997-01-04 06:22:32 -05:00
Richard Kenner fe81e4c4df (yylex): Cast string literal to U_CHAR* for lookup() call.
From-SVN: r13014
1996-10-23 17:46:10 -04:00
Richard Kenner b23635606b (initialize_random_junk): Ignore DOLLARS_IN_IDENTIFIERS.
From-SVN: r12933
1996-10-09 16:20:18 -04:00
Mike Stump 0f41302f47 formatting tweaks
From-SVN: r12390
1996-07-03 22:07:53 +00:00
Richard Kenner 5717cc73de (parse_number): Don't reject long long constants unless pedantic.
From-SVN: r11689
1996-04-10 17:22:35 -04:00
Paul Eggert e12ba0642d Use preprocessor arithmetic instead of C arithmetic to avoid warnings on some compilers.
Use preprocessor arithmetic instead of C arithmetic
to avoid warnings on some compilers.
(HOST_WIDE_INT_MASK): Remove.
(MAX_CHAR_TYPE_MASK, MAX_WCHAR_TYPE_MASK): New macros.
(yylex): Use them.

From-SVN: r11086
1996-01-23 03:28:01 +00:00
Paul Eggert 78ae7d8040 (HOST_WIDE_INT_MASK): Renamed from LONG_MASK; use HOST_WIDE_INT.
(HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT): New (actually resuscitated) macros.
(parse_c_expression, expression_value, parse_escape, left_shift, right_shift,
struct constant, exp, parse_number, yylex): Replace `long' with
`HOST_WIDE_INT'.

From-SVN: r11061
1996-01-18 00:12:52 +00:00
Richard Kenner da51a4782b General code cleanup in the style of 1995-04-01 change.
Add prototypes for static functions.
Add parentheses suggested by `gcc -Wparentheses'.
Use `long' uniformly, instead of long, int, HOST_WIDE_INT mess.
(struct constant): Use `signedp' flag (with sign bit) instead of
`unsignedp' flag; it's a little more convenient.

(HAVE_STDLIB_H, STDC_HEADERS, LONG_MASK, __attribute__, PROTO,
VA_START, PRINTF_ALIST, PRINTF_DCL, PRINTF_PROTO, PRINTF_PROTO_1,
vfprintf, SIGNED, UNSIGNED): New symbols.
<stdlib.h>: Include if HAVE_STDLIB_H.
<string.h>: New include.
(HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT): Remove.
(yylex, yyerror, expression_value, parse_number,
initialize_random_junk): Now static.

(overflow_sum_sign): Renamed from possible_sum_sign, with an
extra arg SIGNEDP.
(parse_number): Inline strcmp when checking for "0x".
(yylex): Keep track of mask needed when decoding wide characters.
(parse_escape): New arg RESULT_MASK; use it instead of
assuming char width.
(yylex, parse_escape, parse_c_expression): Store all host
integers as long, not int or HOST_WIDE_INT.
(left_shift): No need to do signed left shifts separately.

These changes are for the test program (if TEST_EXP_READER):
(pedantic, traditional): Allocate storage.
(main): Set pedantic, traditional, yydebug depending on args.
(is_hor_space, warning, lookup): Change types and implementation
to match rest of program.
(pedwarn, check_assertion, xmalloc): New functions.

From-SVN: r11024
1996-01-16 09:42:30 -05:00
Richard Kenner 4627dc0705 (yylex, parse_c_expression, main): Likewise.
From-SVN: r10904
1995-12-29 18:23:53 -05:00
Richard Kenner 70ce27baad (parse_number): Improve error message for bogus numbers.
(yylex): Consider `0xe-1' to be a (bogus) number if not traditional.

From-SVN: r10891
1995-12-28 07:17:30 -05:00
Richard Kenner 940d9d638b Update FSF address.
From-SVN: r9959
1995-06-15 07:33:25 -04:00
Richard Kenner 138c94ea17 (left_shift): Ignore integer overflow.
From-SVN: r9915
1995-06-09 18:01:39 -04:00
Richard Kenner 245391da4e (skip_evaluation): New variable.
(&&, ||, ?:): Increment it in unevaluated subexpressions.
(/, %, integer_overflow): Suppress diagnostics if skip_evaluation != 0.
(yyerror): Clear skip_evaluation.

From-SVN: r9914
1995-06-09 17:58:24 -04:00
Richard Kenner ecacce3776 (%union): Delete VOIDVAL and SVAL; unused.
From-SVN: r8910
1995-02-11 16:25:21 -05:00
Richard Kenner 979b374813 (HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT): New macros.
(expression_value): Now HOST_WIDE_INT.
(parse_c_expression): Now returns HOST_WIDE_INT.

From-SVN: r8106
1994-09-20 19:02:37 -04:00
Ian Lance Taylor 3f259d6dfb Let tm file define MAX_*_TYPE_SIZE if *_TYPE_SIZE depends upon target_flags
From-SVN: r5640
1993-10-06 17:49:06 +00:00
Richard Stallman 61d8c55e62 (parse_escape): Delete case for '^'.
From-SVN: r3550
1993-02-27 04:12:36 +00:00
Richard Stallman b670485b6a (parse_escape): Support \E and \e like cc1:
they mean \033, and they generate a warning if pedantic.

From-SVN: r3410
1993-02-02 22:14:40 +00:00
Richard Stallman 0671ee4125 (yylex): Make tokstart an unsigned char *.
From-SVN: r3115
1993-01-06 07:28:08 +00:00
Richard Stallman 2f6f882470 (integer_overflow): Do nothing unless pedantic.
From-SVN: r2538
1992-10-21 06:54:16 +00:00
Richard Stallman f46ffce4f8 (parse_escape): Diagnose '\x' with no digits.
Diagnose integer overflow when parsing \x escapes.

From-SVN: r2147
1992-09-17 21:11:17 +00:00
Richard Stallman 3292923dd1 (parse_number): Warn about '9' in octal constants.
Commonize overflow detection for various radices.

From-SVN: r2139
1992-09-17 02:46:36 +00:00
Richard Stallman ce73f2a5bb (parse_number): Diagnose integer constants that are too large.
Diagnose duplicate `l' and `u' suffixes.  Diagnose ` 0x ' and ` 0a '.
Warn about integer constants that are so large that they are unsigned.

From-SVN: r2121
1992-09-14 20:38:33 +00:00
Richard Stallman 4cf8de9f3e (exp): Detect signed integer overflow.
Replace `(unsigned)' with `(unsigned long)'.  When
evaluating << and >>, compute the correct answer without shifting
by more than HOST_BITS_PER_LONG, or by a negative quantity.
(integer_overflow, left_shift, right_shift): New functions.

From-SVN: r2118
1992-09-13 17:36:33 +00:00
Richard Stallman 960e4c1cea Comment syntax fix.
From-SVN: r2041
1992-09-03 06:47:05 +00:00
Tom Wood d6927cc958 (NULL_PTR): Use the same definition as
rtl.h and tree.h.

From-SVN: r1847
1992-08-14 22:52:00 +00:00
Richard Kenner 58c8c59349 entered into RCS
From-SVN: r1731
1992-07-31 08:13:38 -04:00
Richard Stallman 5e0004aef9 *** empty log message ***
From-SVN: r1619
1992-07-18 03:47:44 +00:00