Commit 27b6b158 by Jeff Law

This commit was generated by cvs2svn to compensate for changes in r16983,

which included commits to RCS files with non-trunk default branches.

From-SVN: r16984
parent db2a8c5b
...@@ -235,7 +235,7 @@ Ashland, MA 01721-1987 ...@@ -235,7 +235,7 @@ Ashland, MA 01721-1987
(Please call only between 0900-1700 Eastern time, and only if you (Please call only between 0900-1700 Eastern time, and only if you
are prepared to hire me -- ask me to help you for free only are prepared to hire me -- ask me to help you for free only
via email, to which I might or might not respond.) via email, to which I might or might not respond.)
Email: <burley@gnu.ai.mit.edu> --preferred-- Email: <burley@gnu.org> --preferred--
<burley@cygnus.com> <burley@cygnus.com>
<burley@world.std.com> <burley@world.std.com>
...@@ -254,7 +254,7 @@ Rate: $100/hour -- willing to consider flat-fee arrangements ...@@ -254,7 +254,7 @@ Rate: $100/hour -- willing to consider flat-fee arrangements
Updated: 1997-05-07 Updated: 1997-05-07
 
Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> Thomas Bushnell, n/BSG <thomas@gnu.org>
Becket House Becket House
66 Highland Ave. No. 8 66 Highland Ave. No. 8
Somerville, MA 02143 Somerville, MA 02143
...@@ -271,7 +271,7 @@ Experience: I have done Unix and GNU programming for several years, ...@@ -271,7 +271,7 @@ Experience: I have done Unix and GNU programming for several years,
I am easily available in the Cambridge/Boston area; work via email. I am easily available in the Cambridge/Boston area; work via email.
I am willing to travel for sufficiently large jobs. I am willing to travel for sufficiently large jobs.
Rates: $100/hr, negotiable, less for non-profit organizaions. Rates: $100/hr, negotiable, less for non-profit organizations.
Updated: 1997-05-07 Updated: 1997-05-07
 
...@@ -413,7 +413,7 @@ Cygnus Solutions contacts: ...@@ -413,7 +413,7 @@ Cygnus Solutions contacts:
email: <westcott@cygnus.com> email: <westcott@cygnus.com>
Updated: 1997-09-02 by rms Updated: 1997-09-02 by rms
 
Marcus G. Daniels <marcusd@gnu.ai.mit.edu> Marcus G. Daniels <marcusd@gnu.org>
31060 S. Kaufman Rd. <marcus@tdb.com> 31060 S. Kaufman Rd. <marcus@tdb.com>
Canby, OR 97013-9520 <marcus@sysc.pdx.edu> Canby, OR 97013-9520 <marcus@sysc.pdx.edu>
(503) 651-2694 (503) 651-2694
...@@ -791,13 +791,13 @@ Cellular: +46 (10) 222 64 05 ...@@ -791,13 +791,13 @@ Cellular: +46 (10) 222 64 05
e-mail: <levitte@lp.se> e-mail: <levitte@lp.se>
What I do: What I do:
Primarly I work on GNU software for VMS, both VAX and AXP. I've Primarily I work on GNU software for VMS, both VAX and AXP. I've
been porting GNU Emacs to VMS since spring 1991. I've ported a been porting GNU Emacs to VMS since spring 1991. I've ported a
bunch of other GNU programs as well. I maintain GNU vmslib. bunch of other GNU programs as well. I maintain GNU vmslib.
For further info, see http://www.lp.se/~levitte/prof/resume.html For further info, see http://www.lp.se/~levitte/prof/resume.html
Programs supported: Programs supported:
To a varying degree (ranging from extention and porting to To a varying degree (ranging from extension and porting to
installation and simple questions) at the time of updating this installation and simple questions) at the time of updating this
entry: entry:
- GNU vmslib, emacs, autoconf, zip, diffutils, m4, patch, texinfo, - GNU vmslib, emacs, autoconf, zip, diffutils, m4, patch, texinfo,
...@@ -835,7 +835,7 @@ to 2, 5, 25 and larger number of users via phone, email, ftp. ...@@ -835,7 +835,7 @@ to 2, 5, 25 and larger number of users via phone, email, ftp.
Updated: 1997-05-01 Updated: 1997-05-01
 
Gord Matzigkeit <gord@gnu.ai.mit.edu> Gord Matzigkeit <gord@gnu.org>
2220 Capitol Hill Crescent http://www.m-tech.ab.ca/~gord/ 2220 Capitol Hill Crescent http://www.m-tech.ab.ca/~gord/
Calgary, Alberta T2M 4B9 Voice: (403) 282-1387 Calgary, Alberta T2M 4B9 Voice: (403) 282-1387
CANADA FAX: (403) 284-0137 CANADA FAX: (403) 284-0137
...@@ -1092,10 +1092,10 @@ Signum Support AB is a company dedicated to supporting, developing and ...@@ -1092,10 +1092,10 @@ Signum Support AB is a company dedicated to supporting, developing and
distributing free software for mainly UNIX systems. The people behind distributing free software for mainly UNIX systems. The people behind
Signum Support AB have many years of general UNIX and Internet Signum Support AB have many years of general UNIX and Internet
experience, both as system administrators and as programmers, and also experience, both as system administrators and as programmers, and also
extensive experience in maintaining and administring the GNU programs extensive experience in maintaining and administering the GNU programs
and Linux. and Linux.
Signum Support develops and markets the free GUI equiped Readynet Signum Support develops and markets the free GUI equipped Readynet
Internet server, the free PHTTPD http server and the easy to use Linux Internet server, the free PHTTPD http server and the easy to use Linux
based Fuego firewall. based Fuego firewall.
...@@ -1110,7 +1110,7 @@ Services offered: ...@@ -1110,7 +1110,7 @@ Services offered:
programs. programs.
- Warranty protection. - Warranty protection.
- Finding, Recommending and Investigation of free software in any - Finding, Recommending and Investigation of free software in any
area of the customers choise. area of the customer's choice.
- Regular consulting. - Regular consulting.
Rates: For software items, request our price list. Rates: For software items, request our price list.
...@@ -1118,7 +1118,7 @@ Rates: For software items, request our price list. ...@@ -1118,7 +1118,7 @@ Rates: For software items, request our price list.
Updated: 1997-05-12 Updated: 1997-05-12
 
Jon Solomon <jsol@gnu.ai.mit.edu> Jon Solomon <jsol@gnu.org>
235 Main St., Apt 3C-1 235 Main St., Apt 3C-1
East Hartford, Conn. 06118 East Hartford, Conn. 06118
+1 860 895-8289 +1 860 895-8289
...@@ -1126,7 +1126,7 @@ Updated: 1997-05-12 ...@@ -1126,7 +1126,7 @@ Updated: 1997-05-12
Maintains all GNU software... Available for General Consulting Maintains all GNU software... Available for General Consulting
(contact me if you are interested)... (contact me if you are interested)...
Sendmail a specialty... Can answer questions pertaining to the Sendmail a specialty... Can answer questions pertaining to the
installation, maintainence, bug reporting and fixing for installation, maintenance, bug reporting and fixing for
most GNU products... Adhering to the FSF/GNU copyleft for all most GNU products... Adhering to the FSF/GNU copyleft for all
work... (I only charge for the time it takes to do the above, work... (I only charge for the time it takes to do the above,
the software (and most GNU copyleft'd software) is free. the software (and most GNU copyleft'd software) is free.
...@@ -1162,7 +1162,7 @@ WHEN CONTACTING ME, DO THIS :- ...@@ -1162,7 +1162,7 @@ WHEN CONTACTING ME, DO THIS :-
1) Tell me Immediately, Are You: 1) Tell me Immediately, Are You:
A) Expecting to pay my bill for professional consultancy. A) Expecting to pay my bill for professional consultancy.
B) Seeking a few minutes advice free of charge. B) Seeking a few minutes advice free of charge.
2) Give me your email adddress, or that of a friend. 2) Give me your email address, or that of a friend.
or Volunteer to phone back ~ 5 days later to collect follow-up or Volunteer to phone back ~ 5 days later to collect follow-up
info. from the net. (No I will not incur bills phoning you back). info. from the net. (No I will not incur bills phoning you back).
3) Speak English if you want free advice ! I speak German, & 3) Speak English if you want free advice ! I speak German, &
...@@ -1170,7 +1170,7 @@ WHEN CONTACTING ME, DO THIS :- ...@@ -1170,7 +1170,7 @@ WHEN CONTACTING ME, DO THIS :-
Updated: 1997-05-15 Updated: 1997-05-15
 
Richard M. Stallman <rms@gnu.ai.mit.edu> Richard M. Stallman <rms@gnu.org>
545 Tech Sq, Rm 430 545 Tech Sq, Rm 430
Cambridge, MA 02139 Cambridge, MA 02139
...@@ -1191,7 +1191,7 @@ Phone: (408) 978-1407 ...@@ -1191,7 +1191,7 @@ Phone: (408) 978-1407
Fax: (408) 978-1417 Fax: (408) 978-1417
I will help you port, install and customize GNU Emacs, GCC, G++, I will help you port, install and customize GNU Emacs, GCC, G++,
bison, and other GNU tools on almost any architechture and operating bison, and other GNU tools on almost any architecture and operating
system. Questions answered. GNU C and lisp hacking available. I will system. Questions answered. GNU C and lisp hacking available. I will
also do ongoing support and periodic upgrades if you get on my GNU also do ongoing support and periodic upgrades if you get on my GNU
software subscription list. software subscription list.
...@@ -1314,7 +1314,7 @@ http://info.noris.de/ (German) ...@@ -1314,7 +1314,7 @@ http://info.noris.de/ (German)
Expertise: Expertise:
OS internals, esp. Linux and BSD, esp. device drivers OS internals, esp. Linux and BSD, esp. device drivers
Network protocol / program design and coding Network protocol / program design and coding
Utilities coding and maintainance Utilities coding and maintenance
Program debugging, testing Program debugging, testing
User interface design and testing User interface design and testing
Several programming and tool languages Several programming and tool languages
...@@ -1399,7 +1399,7 @@ E-mail: <zhou@opentech.co.jp> ...@@ -1399,7 +1399,7 @@ E-mail: <zhou@opentech.co.jp>
My profile is listed at: http://www.opentech.co.jp/~zhou/ My profile is listed at: http://www.opentech.co.jp/~zhou/
I have two years of experience porting and supporting GNU C Compiler and I have two years of experience porting and supporting GNU C Compiler and
GNU Assember at the Wingnut project of SRA, Inc., Tokyo. GNU Assembler at the Wingnut project of SRA, Inc., Tokyo.
I can provide free consultation on these products if the problem is not I can provide free consultation on these products if the problem is not
time-consuming. time-consuming.
......
...@@ -25,26 +25,16 @@ ...@@ -25,26 +25,16 @@
#include <setjmp.h> #include <setjmp.h>
/* #define YYDEBUG 1 */ /* #define YYDEBUG 1 */
/* The following symbols should be autoconfigured:
STDC_HEADERS
In the mean time, we'll get by with approximations based
on existing GCC configuration symbols. */
#ifdef POSIX
# ifndef STDC_HEADERS
# define STDC_HEADERS 1
# endif
#endif /* defined (POSIX) */
#if STDC_HEADERS #ifdef HAVE_STRING_H
# include <string.h> # include <string.h>
#endif #endif
#if HAVE_STDLIB_H || defined (MULTIBYTE_CHARS) #ifdef HAVE_STDLIB_H
# include <stdlib.h> # include <stdlib.h>
#endif #endif
#if HAVE_LIMITS_H #ifdef HAVE_LIMITS_H
# include <limits.h> # include <limits.h>
#endif #endif
...@@ -91,12 +81,10 @@ struct arglist { ...@@ -91,12 +81,10 @@ struct arglist {
# define HOST_WIDE_INT intmax_t # define HOST_WIDE_INT intmax_t
# define unsigned_HOST_WIDE_INT uintmax_t # define unsigned_HOST_WIDE_INT uintmax_t
# else # else
# if (HOST_BITS_PER_LONG <= HOST_BITS_PER_INT \ # if (HOST_BITS_PER_LONG <= HOST_BITS_PER_INT && HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_INT)
&& HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_INT)
# define HOST_WIDE_INT int # define HOST_WIDE_INT int
# else # else
# if (HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_LONG \ # if (HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_LONG || ! (defined LONG_LONG_MAX || defined LLONG_MAX))
|| ! (defined LONG_LONG_MAX || defined LLONG_MAX))
# define HOST_WIDE_INT long # define HOST_WIDE_INT long
# else # else
# define HOST_WIDE_INT long long # define HOST_WIDE_INT long long
...@@ -153,11 +141,14 @@ struct arglist { ...@@ -153,11 +141,14 @@ struct arglist {
#define PRINTF_PROTO_1(ARGS) PRINTF_PROTO(ARGS, 1, 2) #define PRINTF_PROTO_1(ARGS) PRINTF_PROTO(ARGS, 1, 2)
HOST_WIDE_INT parse_c_expression PROTO((char *)); HOST_WIDE_INT parse_c_expression PROTO((char *, int));
static int yylex PROTO((void)); static int yylex PROTO((void));
static void yyerror PROTO((char *)) __attribute__ ((noreturn)); static void yyerror PROTO((char *)) __attribute__ ((noreturn));
static HOST_WIDE_INT expression_value; static HOST_WIDE_INT expression_value;
#ifdef TEST_EXP_READER
static int expression_signedp;
#endif
static jmp_buf parse_return_error; static jmp_buf parse_return_error;
...@@ -168,6 +159,9 @@ static int keyword_parsing = 0; ...@@ -168,6 +159,9 @@ static int keyword_parsing = 0;
This is a count, since unevaluated expressions can nest. */ This is a count, since unevaluated expressions can nest. */
static int skip_evaluation; static int skip_evaluation;
/* Nonzero means warn if undefined identifiers are evaluated. */
static int warn_undef;
/* some external tables of character types */ /* some external tables of character types */
extern unsigned char is_idstart[], is_idchar[], is_space[]; extern unsigned char is_idstart[], is_idchar[], is_space[];
...@@ -180,9 +174,6 @@ extern int traditional; ...@@ -180,9 +174,6 @@ extern int traditional;
/* Flag for -lang-c89. */ /* Flag for -lang-c89. */
extern int c89; extern int c89;
/* Flag for -Wundef. */
extern int warn_undef;
#ifndef CHAR_TYPE_SIZE #ifndef CHAR_TYPE_SIZE
#define CHAR_TYPE_SIZE BITS_PER_UNIT #define CHAR_TYPE_SIZE BITS_PER_UNIT
#endif #endif
...@@ -252,7 +243,7 @@ static void integer_overflow PROTO((void)); ...@@ -252,7 +243,7 @@ static void integer_overflow PROTO((void));
#define SIGNED (~0) #define SIGNED (~0)
#define UNSIGNED 0 #define UNSIGNED 0
#line 260 "cexp.y" #line 251 "cexp.y"
typedef union { typedef union {
struct constant {HOST_WIDE_INT value; int signedp;} integer; struct constant {HOST_WIDE_INT value; int signedp;} integer;
struct name {U_CHAR *address; int length;} name; struct name {U_CHAR *address; int length;} name;
...@@ -333,10 +324,10 @@ static const short yyrhs[] = { 35, ...@@ -333,10 +324,10 @@ static const short yyrhs[] = { 35,
#if YYDEBUG != 0 #if YYDEBUG != 0
static const short yyrline[] = { 0, static const short yyrline[] = { 0,
290, 295, 296, 303, 308, 311, 313, 316, 320, 322, 281, 291, 292, 299, 304, 307, 309, 312, 316, 318,
327, 332, 345, 362, 375, 381, 387, 393, 399, 402, 323, 328, 341, 358, 371, 377, 383, 389, 395, 398,
405, 412, 419, 426, 433, 436, 439, 442, 445, 448, 401, 408, 415, 422, 429, 432, 435, 438, 441, 444,
451, 454, 456, 459, 462, 464, 466, 474, 476, 489 447, 450, 452, 455, 458, 460, 462, 470, 472, 485
}; };
#endif #endif
...@@ -934,59 +925,64 @@ yyreduce: ...@@ -934,59 +925,64 @@ yyreduce:
switch (yyn) { switch (yyn) {
case 1: case 1:
#line 291 "cexp.y" #line 282 "cexp.y"
{ expression_value = yyvsp[0].integer.value; ; {
expression_value = yyvsp[0].integer.value;
#ifdef TEST_EXP_READER
expression_signedp = yyvsp[0].integer.signedp;
#endif
;
break;} break;}
case 3: case 3:
#line 297 "cexp.y" #line 293 "cexp.y"
{ if (pedantic) { if (pedantic)
pedwarn ("comma operator in operand of `#if'"); pedwarn ("comma operator in operand of `#if'");
yyval.integer = yyvsp[0].integer; ; yyval.integer = yyvsp[0].integer; ;
break;} break;}
case 4: case 4:
#line 304 "cexp.y" #line 300 "cexp.y"
{ yyval.integer.value = - yyvsp[0].integer.value; { yyval.integer.value = - yyvsp[0].integer.value;
yyval.integer.signedp = yyvsp[0].integer.signedp; yyval.integer.signedp = yyvsp[0].integer.signedp;
if ((yyval.integer.value & yyvsp[0].integer.value & yyval.integer.signedp) < 0) if ((yyval.integer.value & yyvsp[0].integer.value & yyval.integer.signedp) < 0)
integer_overflow (); ; integer_overflow (); ;
break;} break;}
case 5: case 5:
#line 309 "cexp.y" #line 305 "cexp.y"
{ yyval.integer.value = ! yyvsp[0].integer.value; { yyval.integer.value = ! yyvsp[0].integer.value;
yyval.integer.signedp = SIGNED; ; yyval.integer.signedp = SIGNED; ;
break;} break;}
case 6: case 6:
#line 312 "cexp.y" #line 308 "cexp.y"
{ yyval.integer = yyvsp[0].integer; ; { yyval.integer = yyvsp[0].integer; ;
break;} break;}
case 7: case 7:
#line 314 "cexp.y" #line 310 "cexp.y"
{ yyval.integer.value = ~ yyvsp[0].integer.value; { yyval.integer.value = ~ yyvsp[0].integer.value;
yyval.integer.signedp = yyvsp[0].integer.signedp; ; yyval.integer.signedp = yyvsp[0].integer.signedp; ;
break;} break;}
case 8: case 8:
#line 317 "cexp.y" #line 313 "cexp.y"
{ yyval.integer.value = check_assertion (yyvsp[0].name.address, yyvsp[0].name.length, { yyval.integer.value = check_assertion (yyvsp[0].name.address, yyvsp[0].name.length,
0, NULL_PTR); 0, NULL_PTR);
yyval.integer.signedp = SIGNED; ; yyval.integer.signedp = SIGNED; ;
break;} break;}
case 9: case 9:
#line 321 "cexp.y" #line 317 "cexp.y"
{ keyword_parsing = 1; ; { keyword_parsing = 1; ;
break;} break;}
case 10: case 10:
#line 323 "cexp.y" #line 319 "cexp.y"
{ yyval.integer.value = check_assertion (yyvsp[-4].name.address, yyvsp[-4].name.length, { yyval.integer.value = check_assertion (yyvsp[-4].name.address, yyvsp[-4].name.length,
1, yyvsp[-1].keywords); 1, yyvsp[-1].keywords);
keyword_parsing = 0; keyword_parsing = 0;
yyval.integer.signedp = SIGNED; ; yyval.integer.signedp = SIGNED; ;
break;} break;}
case 11: case 11:
#line 328 "cexp.y" #line 324 "cexp.y"
{ yyval.integer = yyvsp[-1].integer; ; { yyval.integer = yyvsp[-1].integer; ;
break;} break;}
case 12: case 12:
#line 333 "cexp.y" #line 329 "cexp.y"
{ yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; { yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp;
if (yyval.integer.signedp) if (yyval.integer.signedp)
{ {
...@@ -1001,7 +997,7 @@ case 12: ...@@ -1001,7 +997,7 @@ case 12:
* yyvsp[0].integer.value); ; * yyvsp[0].integer.value); ;
break;} break;}
case 13: case 13:
#line 346 "cexp.y" #line 342 "cexp.y"
{ if (yyvsp[0].integer.value == 0) { if (yyvsp[0].integer.value == 0)
{ {
if (!skip_evaluation) if (!skip_evaluation)
...@@ -1020,7 +1016,7 @@ case 13: ...@@ -1020,7 +1016,7 @@ case 13:
/ yyvsp[0].integer.value); ; / yyvsp[0].integer.value); ;
break;} break;}
case 14: case 14:
#line 363 "cexp.y" #line 359 "cexp.y"
{ if (yyvsp[0].integer.value == 0) { if (yyvsp[0].integer.value == 0)
{ {
if (!skip_evaluation) if (!skip_evaluation)
...@@ -1035,7 +1031,7 @@ case 14: ...@@ -1035,7 +1031,7 @@ case 14:
% yyvsp[0].integer.value); ; % yyvsp[0].integer.value); ;
break;} break;}
case 15: case 15:
#line 376 "cexp.y" #line 372 "cexp.y"
{ yyval.integer.value = yyvsp[-2].integer.value + yyvsp[0].integer.value; { yyval.integer.value = yyvsp[-2].integer.value + yyvsp[0].integer.value;
yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp;
if (overflow_sum_sign (yyvsp[-2].integer.value, yyvsp[0].integer.value, if (overflow_sum_sign (yyvsp[-2].integer.value, yyvsp[0].integer.value,
...@@ -1043,7 +1039,7 @@ case 15: ...@@ -1043,7 +1039,7 @@ case 15:
integer_overflow (); ; integer_overflow (); ;
break;} break;}
case 16: case 16:
#line 382 "cexp.y" #line 378 "cexp.y"
{ yyval.integer.value = yyvsp[-2].integer.value - yyvsp[0].integer.value; { yyval.integer.value = yyvsp[-2].integer.value - yyvsp[0].integer.value;
yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp;
if (overflow_sum_sign (yyval.integer.value, yyvsp[0].integer.value, if (overflow_sum_sign (yyval.integer.value, yyvsp[0].integer.value,
...@@ -1051,7 +1047,7 @@ case 16: ...@@ -1051,7 +1047,7 @@ case 16:
integer_overflow (); ; integer_overflow (); ;
break;} break;}
case 17: case 17:
#line 388 "cexp.y" #line 384 "cexp.y"
{ yyval.integer.signedp = yyvsp[-2].integer.signedp; { yyval.integer.signedp = yyvsp[-2].integer.signedp;
if ((yyvsp[0].integer.value & yyvsp[0].integer.signedp) < 0) if ((yyvsp[0].integer.value & yyvsp[0].integer.signedp) < 0)
yyval.integer.value = right_shift (&yyvsp[-2].integer, -yyvsp[0].integer.value); yyval.integer.value = right_shift (&yyvsp[-2].integer, -yyvsp[0].integer.value);
...@@ -1059,7 +1055,7 @@ case 17: ...@@ -1059,7 +1055,7 @@ case 17:
yyval.integer.value = left_shift (&yyvsp[-2].integer, yyvsp[0].integer.value); ; yyval.integer.value = left_shift (&yyvsp[-2].integer, yyvsp[0].integer.value); ;
break;} break;}
case 18: case 18:
#line 394 "cexp.y" #line 390 "cexp.y"
{ yyval.integer.signedp = yyvsp[-2].integer.signedp; { yyval.integer.signedp = yyvsp[-2].integer.signedp;
if ((yyvsp[0].integer.value & yyvsp[0].integer.signedp) < 0) if ((yyvsp[0].integer.value & yyvsp[0].integer.signedp) < 0)
yyval.integer.value = left_shift (&yyvsp[-2].integer, -yyvsp[0].integer.value); yyval.integer.value = left_shift (&yyvsp[-2].integer, -yyvsp[0].integer.value);
...@@ -1067,17 +1063,17 @@ case 18: ...@@ -1067,17 +1063,17 @@ case 18:
yyval.integer.value = right_shift (&yyvsp[-2].integer, yyvsp[0].integer.value); ; yyval.integer.value = right_shift (&yyvsp[-2].integer, yyvsp[0].integer.value); ;
break;} break;}
case 19: case 19:
#line 400 "cexp.y" #line 396 "cexp.y"
{ yyval.integer.value = (yyvsp[-2].integer.value == yyvsp[0].integer.value); { yyval.integer.value = (yyvsp[-2].integer.value == yyvsp[0].integer.value);
yyval.integer.signedp = SIGNED; ; yyval.integer.signedp = SIGNED; ;
break;} break;}
case 20: case 20:
#line 403 "cexp.y" #line 399 "cexp.y"
{ yyval.integer.value = (yyvsp[-2].integer.value != yyvsp[0].integer.value); { yyval.integer.value = (yyvsp[-2].integer.value != yyvsp[0].integer.value);
yyval.integer.signedp = SIGNED; ; yyval.integer.signedp = SIGNED; ;
break;} break;}
case 21: case 21:
#line 406 "cexp.y" #line 402 "cexp.y"
{ yyval.integer.signedp = SIGNED; { yyval.integer.signedp = SIGNED;
if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp) if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp)
yyval.integer.value = yyvsp[-2].integer.value <= yyvsp[0].integer.value; yyval.integer.value = yyvsp[-2].integer.value <= yyvsp[0].integer.value;
...@@ -1086,7 +1082,7 @@ case 21: ...@@ -1086,7 +1082,7 @@ case 21:
<= yyvsp[0].integer.value); ; <= yyvsp[0].integer.value); ;
break;} break;}
case 22: case 22:
#line 413 "cexp.y" #line 409 "cexp.y"
{ yyval.integer.signedp = SIGNED; { yyval.integer.signedp = SIGNED;
if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp) if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp)
yyval.integer.value = yyvsp[-2].integer.value >= yyvsp[0].integer.value; yyval.integer.value = yyvsp[-2].integer.value >= yyvsp[0].integer.value;
...@@ -1095,7 +1091,7 @@ case 22: ...@@ -1095,7 +1091,7 @@ case 22:
>= yyvsp[0].integer.value); ; >= yyvsp[0].integer.value); ;
break;} break;}
case 23: case 23:
#line 420 "cexp.y" #line 416 "cexp.y"
{ yyval.integer.signedp = SIGNED; { yyval.integer.signedp = SIGNED;
if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp) if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp)
yyval.integer.value = yyvsp[-2].integer.value < yyvsp[0].integer.value; yyval.integer.value = yyvsp[-2].integer.value < yyvsp[0].integer.value;
...@@ -1104,7 +1100,7 @@ case 23: ...@@ -1104,7 +1100,7 @@ case 23:
< yyvsp[0].integer.value); ; < yyvsp[0].integer.value); ;
break;} break;}
case 24: case 24:
#line 427 "cexp.y" #line 423 "cexp.y"
{ yyval.integer.signedp = SIGNED; { yyval.integer.signedp = SIGNED;
if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp) if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp)
yyval.integer.value = yyvsp[-2].integer.value > yyvsp[0].integer.value; yyval.integer.value = yyvsp[-2].integer.value > yyvsp[0].integer.value;
...@@ -1113,64 +1109,64 @@ case 24: ...@@ -1113,64 +1109,64 @@ case 24:
> yyvsp[0].integer.value); ; > yyvsp[0].integer.value); ;
break;} break;}
case 25: case 25:
#line 434 "cexp.y" #line 430 "cexp.y"
{ yyval.integer.value = yyvsp[-2].integer.value & yyvsp[0].integer.value; { yyval.integer.value = yyvsp[-2].integer.value & yyvsp[0].integer.value;
yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ; yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ;
break;} break;}
case 26: case 26:
#line 437 "cexp.y" #line 433 "cexp.y"
{ yyval.integer.value = yyvsp[-2].integer.value ^ yyvsp[0].integer.value; { yyval.integer.value = yyvsp[-2].integer.value ^ yyvsp[0].integer.value;
yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ; yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ;
break;} break;}
case 27: case 27:
#line 440 "cexp.y" #line 436 "cexp.y"
{ yyval.integer.value = yyvsp[-2].integer.value | yyvsp[0].integer.value; { yyval.integer.value = yyvsp[-2].integer.value | yyvsp[0].integer.value;
yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ; yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ;
break;} break;}
case 28: case 28:
#line 443 "cexp.y" #line 439 "cexp.y"
{ skip_evaluation += !yyvsp[-1].integer.value; ; { skip_evaluation += !yyvsp[-1].integer.value; ;
break;} break;}
case 29: case 29:
#line 445 "cexp.y" #line 441 "cexp.y"
{ skip_evaluation -= !yyvsp[-3].integer.value; { skip_evaluation -= !yyvsp[-3].integer.value;
yyval.integer.value = (yyvsp[-3].integer.value && yyvsp[0].integer.value); yyval.integer.value = (yyvsp[-3].integer.value && yyvsp[0].integer.value);
yyval.integer.signedp = SIGNED; ; yyval.integer.signedp = SIGNED; ;
break;} break;}
case 30: case 30:
#line 449 "cexp.y" #line 445 "cexp.y"
{ skip_evaluation += !!yyvsp[-1].integer.value; ; { skip_evaluation += !!yyvsp[-1].integer.value; ;
break;} break;}
case 31: case 31:
#line 451 "cexp.y" #line 447 "cexp.y"
{ skip_evaluation -= !!yyvsp[-3].integer.value; { skip_evaluation -= !!yyvsp[-3].integer.value;
yyval.integer.value = (yyvsp[-3].integer.value || yyvsp[0].integer.value); yyval.integer.value = (yyvsp[-3].integer.value || yyvsp[0].integer.value);
yyval.integer.signedp = SIGNED; ; yyval.integer.signedp = SIGNED; ;
break;} break;}
case 32: case 32:
#line 455 "cexp.y" #line 451 "cexp.y"
{ skip_evaluation += !yyvsp[-1].integer.value; ; { skip_evaluation += !yyvsp[-1].integer.value; ;
break;} break;}
case 33: case 33:
#line 457 "cexp.y" #line 453 "cexp.y"
{ skip_evaluation += !!yyvsp[-4].integer.value - !yyvsp[-4].integer.value; ; { skip_evaluation += !!yyvsp[-4].integer.value - !yyvsp[-4].integer.value; ;
break;} break;}
case 34: case 34:
#line 459 "cexp.y" #line 455 "cexp.y"
{ skip_evaluation -= !!yyvsp[-6].integer.value; { skip_evaluation -= !!yyvsp[-6].integer.value;
yyval.integer.value = yyvsp[-6].integer.value ? yyvsp[-3].integer.value : yyvsp[0].integer.value; yyval.integer.value = yyvsp[-6].integer.value ? yyvsp[-3].integer.value : yyvsp[0].integer.value;
yyval.integer.signedp = yyvsp[-3].integer.signedp & yyvsp[0].integer.signedp; ; yyval.integer.signedp = yyvsp[-3].integer.signedp & yyvsp[0].integer.signedp; ;
break;} break;}
case 35: case 35:
#line 463 "cexp.y" #line 459 "cexp.y"
{ yyval.integer = yylval.integer; ; { yyval.integer = yylval.integer; ;
break;} break;}
case 36: case 36:
#line 465 "cexp.y" #line 461 "cexp.y"
{ yyval.integer = yylval.integer; ; { yyval.integer = yylval.integer; ;
break;} break;}
case 37: case 37:
#line 467 "cexp.y" #line 463 "cexp.y"
{ if (warn_undef && !skip_evaluation) { if (warn_undef && !skip_evaluation)
warning ("`%.*s' is not defined", warning ("`%.*s' is not defined",
yyvsp[0].name.length, yyvsp[0].name.address); yyvsp[0].name.length, yyvsp[0].name.address);
...@@ -1178,11 +1174,11 @@ case 37: ...@@ -1178,11 +1174,11 @@ case 37:
yyval.integer.signedp = SIGNED; ; yyval.integer.signedp = SIGNED; ;
break;} break;}
case 38: case 38:
#line 475 "cexp.y" #line 471 "cexp.y"
{ yyval.keywords = 0; ; { yyval.keywords = 0; ;
break;} break;}
case 39: case 39:
#line 477 "cexp.y" #line 473 "cexp.y"
{ struct arglist *temp; { struct arglist *temp;
yyval.keywords = (struct arglist *) xmalloc (sizeof (struct arglist)); yyval.keywords = (struct arglist *) xmalloc (sizeof (struct arglist));
yyval.keywords->next = yyvsp[-2].keywords; yyval.keywords->next = yyvsp[-2].keywords;
...@@ -1197,7 +1193,7 @@ case 39: ...@@ -1197,7 +1193,7 @@ case 39:
temp->next->length = 1; ; temp->next->length = 1; ;
break;} break;}
case 40: case 40:
#line 490 "cexp.y" #line 486 "cexp.y"
{ yyval.keywords = (struct arglist *) xmalloc (sizeof (struct arglist)); { yyval.keywords = (struct arglist *) xmalloc (sizeof (struct arglist));
yyval.keywords->name = yyvsp[-1].name.address; yyval.keywords->name = yyvsp[-1].name.address;
yyval.keywords->length = yyvsp[-1].name.length; yyval.keywords->length = yyvsp[-1].name.length;
...@@ -1401,7 +1397,7 @@ yyerrhandle: ...@@ -1401,7 +1397,7 @@ yyerrhandle:
yystate = yyn; yystate = yyn;
goto yynewstate; goto yynewstate;
} }
#line 495 "cexp.y" #line 491 "cexp.y"
/* During parsing of a C expression, the pointer to the next character /* During parsing of a C expression, the pointer to the next character
...@@ -1610,7 +1606,7 @@ yylex () ...@@ -1610,7 +1606,7 @@ yylex ()
It is mostly copied from c-lex.c. */ It is mostly copied from c-lex.c. */
{ {
register HOST_WIDE_INT result = 0; register HOST_WIDE_INT result = 0;
register num_chars = 0; register int num_chars = 0;
unsigned width = MAX_CHAR_TYPE_SIZE; unsigned width = MAX_CHAR_TYPE_SIZE;
int max_chars; int max_chars;
char *token_buffer; char *token_buffer;
...@@ -1968,17 +1964,20 @@ right_shift (a, b) ...@@ -1968,17 +1964,20 @@ right_shift (a, b)
/* This page contains the entry point to this file. */ /* This page contains the entry point to this file. */
/* Parse STRING as an expression, and complain if this fails /* Parse STRING as an expression, and complain if this fails
to use up all of the contents of STRING. */ to use up all of the contents of STRING.
/* STRING may contain '\0' bytes; it is terminated by the first '\n' STRING may contain '\0' bytes; it is terminated by the first '\n'
outside a string constant, so that we can diagnose '\0' properly. */ outside a string constant, so that we can diagnose '\0' properly.
/* We do not support C comments. They should be removed before If WARN_UNDEFINED is nonzero, warn if undefined identifiers are evaluated.
We do not support C comments. They should be removed before
this function is called. */ this function is called. */
HOST_WIDE_INT HOST_WIDE_INT
parse_c_expression (string) parse_c_expression (string, warn_undefined)
char *string; char *string;
int warn_undefined;
{ {
lexptr = string; lexptr = string;
warn_undef = warn_undefined;
/* if there is some sort of scanning error, just return 0 and assume /* if there is some sort of scanning error, just return 0 and assume
the parsing routine has printed an error message somewhere. the parsing routine has printed an error message somewhere.
...@@ -2006,6 +2005,7 @@ int traditional; ...@@ -2006,6 +2005,7 @@ int traditional;
int main PROTO((int, char **)); int main PROTO((int, char **));
static void initialize_random_junk PROTO((void)); static void initialize_random_junk PROTO((void));
static void print_unsigned_host_wide_int PROTO((unsigned_HOST_WIDE_INT));
/* Main program for testing purposes. */ /* Main program for testing purposes. */
int int
...@@ -2015,6 +2015,7 @@ main (argc, argv) ...@@ -2015,6 +2015,7 @@ main (argc, argv)
{ {
int n, c; int n, c;
char buf[1024]; char buf[1024];
unsigned_HOST_WIDE_INT u;
pedantic = 1 < argc; pedantic = 1 < argc;
traditional = 2 < argc; traditional = 2 < argc;
...@@ -2030,12 +2031,35 @@ main (argc, argv) ...@@ -2030,12 +2031,35 @@ main (argc, argv)
n++; n++;
if (c == EOF) if (c == EOF)
break; break;
printf ("parser returned %ld\n", (long) parse_c_expression (buf)); parse_c_expression (buf, 1);
printf ("parser returned ");
u = (unsigned_HOST_WIDE_INT) expression_value;
if (expression_value < 0 && expression_signedp) {
u = -u;
printf ("-");
}
if (u == 0)
printf ("0");
else
print_unsigned_host_wide_int (u);
if (! expression_signedp)
printf("u");
printf ("\n");
} }
return 0; return 0;
} }
static void
print_unsigned_host_wide_int (u)
unsigned_HOST_WIDE_INT u;
{
if (u) {
print_unsigned_host_wide_int (u / 10);
putchar ('0' + (int) (u % 10));
}
}
/* table to tell if char can be part of a C identifier. */ /* table to tell if char can be part of a C identifier. */
unsigned char is_idchar[256]; unsigned char is_idchar[256];
/* table to tell if char can be first char of a c identifier. */ /* table to tell if char can be first char of a c identifier. */
......
/* Configuration for GCC for Intel i386 running Linux. /* Configuration for GCC for Intel i386 running Linux-based GNU systems./
Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc. Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
Contributed by H.J. Lu (hjl@nynexst.com) Contributed by H.J. Lu (hjl@nynexst.com)
......
...@@ -2,17 +2,6 @@ ...@@ -2,17 +2,6 @@
#include <arm/xm-arm.h> #include <arm/xm-arm.h>
/* xm-netbsd.h defines this */
#ifdef HAVE_VPRINTF
#undef HAVE_VPRINTF
#endif
#ifndef SYS_SIGLIST_DECLARED #ifndef SYS_SIGLIST_DECLARED
#define SYS_SIGLIST_DECLARED #define SYS_SIGLIST_DECLARED
#endif #endif
#ifndef HAVE_STRERROR
#define HAVE_STRERROR
#endif
#include <xm-netbsd.h>
/* Configuration for GCC for Intel i386 running Linux. /* Configuration for GCC for Intel i386 running Linux-based GNU systems.
Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
Contributed by H.J. Lu (hjl@nynexst.com) Contributed by H.J. Lu (hjl@nynexst.com)
This file is part of GNU CC. This file is part of GNU CC.
......
/* Configuration for GNU C-compiler for Intel 80386 running SunOS 4.0. /* Configuration for GNU C-compiler for Intel 80386 running SunOS 4.0.
Copyright (C) 1988 Free Software Foundation, Inc. Copyright (C) 1988, 1997 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -21,7 +21,3 @@ Boston, MA 02111-1307, USA. */ ...@@ -21,7 +21,3 @@ Boston, MA 02111-1307, USA. */
#define USG #define USG
#include "i386/xm-i386.h" #include "i386/xm-i386.h"
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)
#define USG #define USG
#include "m68k/xm-m68k.h" #include "m68k/xm-m68k.h"
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)
/* Definitions of host machine for GNU compiler. /* Definitions of host machine for GNU compiler.
Commodore Amiga A3000UX version. Commodore Amiga A3000UX version.
Copyright (C) 1991, 1997 Free Software Foundation, Inc.
Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -22,7 +21,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -22,7 +21,6 @@ Boston, MA 02111-1307, USA. */
#include "m68k/xm-m68kv.h" /* Use the System V flavor of m68k host */ #include "m68k/xm-m68kv.h" /* Use the System V flavor of m68k host */
#define HAVE_VPRINTF /* Host has vprintf() in library */
#define rindex strrchr #define rindex strrchr
#define index strchr #define index strchr
......
...@@ -3,12 +3,6 @@ ...@@ -3,12 +3,6 @@
#include "m68k/xm-m68k.h" #include "m68k/xm-m68k.h"
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)
#define rindex strrchr
#define index strchr
/* If compiling with HPUX compiler, we are probably using alloca.c, /* If compiling with HPUX compiler, we are probably using alloca.c,
so help it work right. */ so help it work right. */
#ifndef __GNUC__ #ifndef __GNUC__
......
/* Configuration for GCC for Motorola m68k running Linux. */ /* Configuration for GCC for Motorola m68k running Linux-based GNU systems. */
#include <m68k/xm-m68k.h> #include <m68k/xm-m68k.h>
#include <xm-linux.h> #include <xm-linux.h>
...@@ -3,12 +3,6 @@ ...@@ -3,12 +3,6 @@
#include "m68k/xm-m68k.h" #include "m68k/xm-m68k.h"
#define USG #define USG
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)
#define rindex strrchr
#define index strchr
#ifndef __GNUC__ #ifndef __GNUC__
#define USE_C_ALLOCA #define USE_C_ALLOCA
......
#include "mips/xm-mips.h" #include "mips/xm-mips.h"
#define USG #define USG
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)
#include "mips/xm-mips.h" #include "mips/xm-mips.h"
#define USG #define USG
#define HAVE_VPRINTF
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)
#if 0 #if 0
#ifdef __GNUC__ #ifdef __GNUC__
......
/* Configuration for GNU C-compiler for UMIPS operating system /* Configuration for GNU C-compiler for UMIPS operating system
Copyright (C) 1989, 1990, 1991 Free Software Foundation, Inc. Copyright (C) 1989, 1990, 1991, 1997 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -28,11 +28,3 @@ Boston, MA 02111-1307, USA. */ ...@@ -28,11 +28,3 @@ Boston, MA 02111-1307, USA. */
#define USG #define USG
#include "mips/xm-mips.h" #include "mips/xm-mips.h"
#define bcopy(a,b,c) memcpy((b),(a),(c))
#define bzero(a,b) memset((a),0,(b))
#define bcmp(a,b,c) memcmp((a),(b),(c))
#define rindex strrchr
#define index strchr
...@@ -3,7 +3,3 @@ ...@@ -3,7 +3,3 @@
#include "ns32k/xm-ns32k.h" #include "ns32k/xm-ns32k.h"
#define USG #define USG
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
#include "sparc/xm-sparc.h" #include "sparc/xm-sparc.h"
#define USG #define USG
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)
#ifndef __GNUC__ #ifndef __GNUC__
#define USE_C_ALLOCA #define USE_C_ALLOCA
......
/* Config file for Vax running system V. */ /* Config file for Vax running system V. */
#define USG #define USG
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)
/* Configuration for GNU C-compiler for hosts running System V Release 3 /* Configuration for GNU C-compiler for hosts running System V Release 3
Copyright (C) 1991, 1993 Free Software Foundation, Inc. Copyright (C) 1991, 1993, 1996 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -18,15 +18,7 @@ along with GNU CC; see the file COPYING. If not, write to ...@@ -18,15 +18,7 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#define bcopy(src,dst,len) memcpy ((dst),(src),(len))
#define bzero(dst,len) memset ((dst),0,(len))
#define bcmp(left,right,len) memcmp ((left),(right),(len))
#define rindex strrchr
#define index strchr
#define USG #define USG
#define HAVE_VPRINTF
#ifndef SVR3 #ifndef SVR3
#define SVR3 #define SVR3
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment