Commit Graph

334 Commits

Author SHA1 Message Date
J"orn Rennecke
a6124a42bc glimits.h (SHRT_MIN): Define in a way suitable for 16 bit hosts.
* glimits.h (SHRT_MIN): Define in a way suitable for 16 bit hosts.

        * c-lex.c (whitespace_cr, skip_white_space_on_line): New functions.
        (skip_white_space): Use whitespace_cr.
        (check_newline): Handle whitespace more consistently.

From-SVN: r16433
1997-11-12 03:17:41 +00:00
Doug Evans
645ebf3767 c-lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
* c-lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
	(yylex): Record wide strings using target endianness, not host.

From-SVN: r16315
1997-11-04 21:56:24 +00:00
Jeff Law
e9a25f70a0 Update mainline egcs to gcc2 snapshot 971021.
From-SVN: r16278
1997-11-02 14:19:36 -07:00
Jeff Law
881d7cb9d4 c-lex.c (check_newline): Pass finput again to HANDLE_PRAGMA.
* c-lex.c (check_newline): Pass finput again to HANDLE_PRAGMA.
Bring over from the FSF.

From-SVN: r14802
1997-08-14 23:32:53 -06:00
Per Bothner
736c628948 * c-lex.c (lang_init): Remove (recently moved here).
From-SVN: r14602
1997-08-01 14:18:54 -07:00
Per Bothner
e3d1fd3263 Patches to use cpplib with cc1 #if USE_CPPLIB.
From-SVN: r14557
1997-07-29 15:40:30 -07:00
Jason Merrill
9a666dda81 x
From-SVN: r13160
1996-11-15 07:14:08 +00:00
Richard Kenner
f84cddb998 (yylex): Treat $' just like _', except issue a diagnostic if
!dollars_in_ident or if pedantic.

From-SVN: r12927
1996-10-09 16:19:12 -04:00
Richard Kenner
7791247664 (yylex): Add new arg, TYPE, to call to build_complex.
From-SVN: r12864
1996-09-29 19:02:58 -04:00
Richard Kenner
a8767945fe (check_newline): Fix #pragma parsing; issue error message for
directive that starts with `p' but isn't `pragma'.

From-SVN: r11928
1996-05-05 21:59:45 -04:00
Jim Wilson
141713de67 (check_newline): Rewrite to use tokens.
(handle_sysv_pragma): Take a token instead of a character.

From-SVN: r11838
1996-04-17 11:54:58 -07:00
Richard Kenner
d669f5da3c (yylex...
(yylex, case '0'..'9','.'): For cases '0' and '1', check for single
digit constant before resorting to general number processing.

From-SVN: r11297
1996-02-18 21:13:37 -05:00
Doug Evans
79a8aaa8da (check_newline): HANDLE_PRAGMA returns terminating char as result now.
From-SVN: r11155
1996-02-01 22:48:54 +00:00
Doug Evans
05a81fe58a c-lex.c (check_newline): Pass character after `#pragma' to HANDLE_PRAGMA.
* c-lex.c (check_newline): Pass character after `#pragma' to
	HANDLE_PRAGMA.  Don't call get_directive_line if at end of line.
	* c-common.c (get_directive_line): Watch for EOF.
	* h8300/h8300.h (HANDLE_PRAGMA): New argument `c'.
	Must issue `return' now.
	* i960/i960.h (HANDLE_PRAGMA): Likewise.
	* sh/sh.h (HANDLE_PRAGMA): Likewise.
	* nextstep.h (HANDLE_PRAGMA): Likewise.
	* h8300/h8300.c (handle_pragma): New argument `ch'.
	Simplify pragma processing.  Delete support for `#pragma section'.
	* i960/i960.c (process_pragma): New argument `c'.  Change result to
	terminating character.
	* nextstep.c (handle_pragma): Likewise.
	* sh/sh.c (handle_pragma): Likewise.  Also simplified.

From-SVN: r10999
1996-01-15 22:25:24 +00:00
Richard Kenner
91b0989ef6 (yylex): Improve error message for bogus numbers.
Consolidate duplicated code.

From-SVN: r10892
1995-12-28 07:21:45 -05:00
Ian Lance Taylor
1a6281cb9c Call new dbxout functions when changing source files.
From-SVN: r10705
1995-12-13 20:00:25 +00:00
Richard Kenner
940d9d638b Update FSF address.
From-SVN: r9959
1995-06-15 07:33:25 -04:00
Richard Kenner
ddd5a7c180 Fix typos in comments.
From-SVN: r9711
1995-05-16 08:14:26 -04:00
Michael Meissner
3d6f7931f9 Move pragma interface support to c-pragma.h
From-SVN: r9410
1995-04-18 18:16:51 +00:00
Richard Kenner
abfe15243c (yylex, case !NOT_FLOAT): Remove previous change.
From-SVN: r9110
1995-03-02 18:08:54 -05:00
Richard Kenner
1f74693668 (yylex): Add support for <: :> <% %> digraphs.
From-SVN: r8982
1995-02-21 06:41:31 -05:00
Richard Kenner
86d6a10a6e (yylex): For float, build constant in long double.
From-SVN: r8980
1995-02-21 06:16:29 -05:00
Richard Kenner
0468bc7566 (check_newline): Give warning if unrecognized data on #line.
(yylex): Give error for unterminated string constant.

From-SVN: r8976
1995-02-21 05:37:13 -05:00
Jim Wilson
e0bf6b33d8 (yylex): Do warn about floating point out of range if target floating-point format is IEEE.
(yylex): Do warn about floating point out of range if
target floating-point format is IEEE.  Use warning instead of
pedwarn to avoid getting errors.

From-SVN: r8538
1994-11-21 11:06:09 -08:00
Jim Wilson
b8bdbf1625 (yylex): Reject imaginary numbers when pedantic.
From-SVN: r7646
1994-07-02 16:13:19 -07:00
Richard Kenner
9083509785 (check_newline): Avoid unreachable statement when HANDLE_SYSV_PRAGMA
defined.

From-SVN: r7092
1994-04-20 06:40:07 -04:00
Richard Kenner
a47a0ed53b (yylex): If FP value is NaN, use value of zero.
From-SVN: r7071
1994-04-18 15:25:32 -04:00
Richard Kenner
ba85b2e482 (yylex): Turn off overflow flag when fixing up large traditional hex
constants.

From-SVN: r7050
1994-04-16 17:04:03 -04:00
Richard Kenner
877eef6d86 Delete gperf-generated source from here.
From-SVN: r6694
1994-03-04 17:16:16 -05:00
Richard Kenner
1c7b145e25 (readescape): Initialize FIRSTDIG.
From-SVN: r6638
1994-02-27 10:44:00 -05:00
Jim Wilson
b408c3fd00 (yylex): When reading malformed floating point constant,
avoid printing error more than once, and avoid passing malformed
number to subsequent atof call.

From-SVN: r6201
1993-12-10 12:41:43 -08:00
Paul Eggert
cf1d841dcb (ignore_escape_flag): Remove var.
(check_newline, yylex): Do not ignore escapes when reading file names,
because escapes are the only way to represent file names containing '"'.

From-SVN: r5528
1993-09-29 05:42:10 +00:00
Richard Stallman
e26ceb2843 (yylex): Handle i together with f or l in float constant.
From-SVN: r5501
1993-09-28 01:02:31 +00:00
Richard Stallman
8ffd69e449 Include ctype.h.
(isalnum, isdigit): Macros deleted.

From-SVN: r4744
1993-06-26 12:27:32 +00:00
Richard Stallman
3285fe92de (readescape): Don't complain for \% unless pedantic.
From-SVN: r4575
1993-05-26 06:21:37 +00:00
Richard Stallman
5f0abdc3ca (yylex): Avoid invalid shift for erroneous empty char const.
From-SVN: r4292
1993-05-01 02:59:52 +00:00
Richard Kenner
e36a3b5d26 (yylex): Don't use unsigned comparison to also check for < 0; do it
explicitly.

From-SVN: r4257
1993-04-28 14:54:51 -04:00
Richard Kenner
6c54821635 (yylex): Don't warn about floating point out of range if target
floating-point format is IEEE.

From-SVN: r4213
1993-04-25 10:22:15 -04:00
Richard Kenner
ea64849ec1 (forget_protocol_qualifiers): Cast enums to int before comparing.
From-SVN: r4211
1993-04-24 16:45:57 -04:00
Tom Wood
e31c7eec77 *** empty log message ***
From-SVN: r4068
1993-04-09 23:12:37 +00:00
Richard Stallman
f6cb348739 More of previous change.
From-SVN: r4060
1993-04-09 21:47:48 +00:00
Richard Stallman
b539a65169 (yylex): Use MAP_CHARACTER if it's defined.
From-SVN: r4059
1993-04-09 21:46:58 +00:00
Richard Stallman
1454a5ba18 (yylex): Convert real decimal constants directly to the precision specified by the letter at the end of the number.
(yylex): Convert real decimal constants directly
to the precision specified by the letter at the end of the number.
Pass mode arg to REAL_VALUE_ATOF to specify precision.
Move the "out of range of double" error check.

From-SVN: r3936
1993-03-31 05:44:03 +00:00
Richard Stallman
c4c7fef15c Updated for recent change in c-parse.gperf.
From-SVN: r3897
1993-03-28 05:42:22 +00:00
Richard Stallman
8f7ac2203e (yylex): Copy the string value we get from __FUNCTION__.
From-SVN: r3798
1993-03-20 09:05:49 +00:00
Richard Stallman
122026c09f (init_lex): Initialize rid pointers for complex.
(yylex): Handle i or j in numeric constant.

From-SVN: r3633
1993-03-04 18:34:10 +00:00
Richard Stallman
6506ecd7a5 (init_lex): Set up ridpointers for `iterator'.
But maybe turn it off again.

From-SVN: r3588
1993-03-02 04:30:43 +00:00
Richard Stallman
6f2f09cd26 (init_lex): Maybe turn off `iterator' as keyword.
From-SVN: r3581
1993-03-02 02:12:44 +00:00
Richard Stallman
5b450ae528 (check_newline): #line updates input_file_stack->name.
From-SVN: r3556
1993-02-27 19:09:40 +00:00
Richard Stallman
76cf6e120e (yylex): Undo Feb 7 change.
From-SVN: r3487
1993-02-18 23:44:34 +00:00
Richard Stallman
f3acae4d7c (yylex): For wide char constant, use wchar_type_node.
Swallow any preprocessing number as a (possibly erroneous) number.

From-SVN: r3464
1993-02-12 07:36:00 +00:00
Richard Stallman
2e90c25ade (yylex): At eof, if binding levels not popped,
imagine some close-braces to pop them.

From-SVN: r3435
1993-02-07 18:15:41 +00:00
Richard Stallman
ba99333a38 (yylex): Change warning msg when decimal const is unsigned.
From-SVN: r3172
1993-01-09 09:25:56 +00:00
Richard Stallman
8355fc27ae (yylex): Don't allow @ in identifier outside of Objective C.
From-SVN: r3163
1993-01-09 02:56:59 +00:00
Richard Stallman
dad112cafd (readescape): Support \e like \E. Warn only if -pedantic.
From-SVN: r2697
1992-11-06 08:08:51 +00:00
Richard Stallman
547ad55772 (yylex): For floats, Use REAL_VALUES_LESS to distinguish underflow from overflow.
(yylex): For floats, Use REAL_VALUES_LESS to distinguish
underflow from overflow.  Delete special case for 0.0.

From-SVN: r2363
1992-10-08 07:13:12 +00:00
Richard Stallman
be63d91206 (readescape): No warning if digits in \x are all 0's.
From-SVN: r2318
1992-10-04 04:58:30 +00:00
Richard Kenner
fad04099d7 (yylex, case '"'): Initialize arg pased to readescape.
From-SVN: r2231
1992-09-24 15:23:56 -04:00
Richard Stallman
b70af677f2 (readescape): New arg ignore_ptr.
(yylex): Pass new arg, handle result that comes back.

From-SVN: r2222
1992-09-24 06:53:13 +00:00
Richard Stallman
5a9085c7dc (yylex): Integer constant is unsigned for purposes of
int_fits_type_p so that it compares huge constants properly.

From-SVN: r2127
1992-09-15 21:37:46 +00:00
Richard Stallman
c832a30eb3 (yylex): Warn about integers so large that they are unsigned.
From-SVN: r2120
1992-09-14 18:45:50 +00:00
Richard Stallman
a120b7889d (yylex): If integer value overflows so highword is negative,
it needs unsigned long long.

From-SVN: r2111
1992-09-12 19:08:12 +00:00
Richard Stallman
8696da340c (readescape): For \x, don't include leading 0's in count.
From-SVN: r1973
1992-08-27 05:55:33 +00:00
Richard Stallman
7e6b19dcb1 (readescape): DEL isn't printable.
From-SVN: r1971
1992-08-27 05:45:47 +00:00
Richard Stallman
88dd95c1c0 (yylex): When traditional, convert 0x80000000 to -0x80000000.
From-SVN: r1738
1992-08-01 18:07:21 +00:00
Richard Stallman
63ea33ce94 (yylex): Diagnose 1.0fl'. Issue just one diagnostic for 1e1000000f'.
From-SVN: r1685
1992-07-25 08:18:47 +00:00
Mike Stump
a25432837c add an explicit int to a register decl
From-SVN: r1671
1992-07-23 17:00:21 +00:00
Richard Kenner
9b0995aace (yylex): Ensure TOTAL_PARTS is wide enough to store a constant as wide as we can store in an INTEGER_CST.
(yylex): Ensure TOTAL_PARTS is wide enough to store a
constant as wide as we can store in an INTEGER_CST.
(LONG_LONG_TYPE_SIZE): Deleted; no longer needed.

From-SVN: r1588
1992-07-14 06:09:46 -04:00
Richard Kenner
8d9bfdc59d Changes to support execution on 64-bit machines.
From-SVN: r1484
1992-07-06 18:35:53 -04:00
Richard Stallman
4ca827d08d (yylex): For integers, rename shorts to parts.
Let the number of them be variable.  Simplify overflow testing.
Don't use long long types unless ll was specified.
Don't warn twice.

From-SVN: r1463
1992-07-06 19:34:19 +00:00
Tom Wood
a3100298b4 Undo rcs botch
From-SVN: r1370
1992-07-01 12:58:09 +00:00
Richard Stallman
ca5b800aa2 (check_newline): Support HANDLE_SYSV_PRAGMA.
(handle_sysv_pragma): New function.

From-SVN: r1367
1992-07-01 02:34:39 +00:00
Richard Stallman
7b6327ae85 fix typos in comments.
From-SVN: r1264
1992-06-24 04:04:50 +00:00
Richard Stallman
ef66cdfecd Don't know what changed.
From-SVN: r1261
1992-06-24 03:46:32 +00:00
Richard Stallman
473a05b950 entered into RCS
From-SVN: r1155
1992-06-04 18:36:38 +00:00
Richard Stallman
80f5b9d813 *** empty log message ***
From-SVN: r1146
1992-06-03 19:01:26 +00:00
Richard Stallman
88d92ca5b2 *** empty log message ***
From-SVN: r1051
1992-05-22 19:43:56 +00:00
Richard Stallman
e53c841d03 *** empty log message ***
From-SVN: r1041
1992-05-21 18:59:21 +00:00
Richard Stallman
7e8b9a1d77 *** empty log message ***
From-SVN: r1003
1992-05-17 20:20:47 +00:00
Richard Stallman
6dbf678a01 *** empty log message ***
From-SVN: r1002
1992-05-17 20:16:20 +00:00
Richard Stallman
0dcd8ceed3 *** empty log message ***
From-SVN: r786
1992-04-18 21:22:25 +00:00
Jim Wilson
a3ee589982 *** empty log message ***
From-SVN: r742
1992-04-14 10:46:57 -07:00
Richard Stallman
d45cf215ee *** empty log message ***
From-SVN: r472
1992-03-14 05:07:15 +00:00
Richard Kenner
e8bbfc4e23 Initial revision
From-SVN: r406
1992-03-06 18:36:01 -05:00