mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-18 20:39:56 +08:00
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
This commit is contained in:
parent
db2a8c5b6d
commit
27b6b158c2
34
gcc/SERVICE
34
gcc/SERVICE
@ -235,7 +235,7 @@ Ashland, MA 01721-1987
|
||||
(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
|
||||
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@world.std.com>
|
||||
|
||||
@ -254,7 +254,7 @@ Rate: $100/hour -- willing to consider flat-fee arrangements
|
||||
|
||||
Updated: 1997-05-07
|
||||
|
||||
Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
|
||||
Thomas Bushnell, n/BSG <thomas@gnu.org>
|
||||
Becket House
|
||||
66 Highland Ave. No. 8
|
||||
Somerville, MA 02143
|
||||
@ -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 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
|
||||
|
||||
@ -413,7 +413,7 @@ Cygnus Solutions contacts:
|
||||
email: <westcott@cygnus.com>
|
||||
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>
|
||||
Canby, OR 97013-9520 <marcus@sysc.pdx.edu>
|
||||
(503) 651-2694
|
||||
@ -791,13 +791,13 @@ Cellular: +46 (10) 222 64 05
|
||||
e-mail: <levitte@lp.se>
|
||||
|
||||
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
|
||||
bunch of other GNU programs as well. I maintain GNU vmslib.
|
||||
For further info, see http://www.lp.se/~levitte/prof/resume.html
|
||||
|
||||
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
|
||||
entry:
|
||||
- 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.
|
||||
|
||||
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/
|
||||
Calgary, Alberta T2M 4B9 Voice: (403) 282-1387
|
||||
CANADA FAX: (403) 284-0137
|
||||
@ -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
|
||||
Signum Support AB have many years of general UNIX and Internet
|
||||
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.
|
||||
|
||||
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
|
||||
based Fuego firewall.
|
||||
|
||||
@ -1110,7 +1110,7 @@ Services offered:
|
||||
programs.
|
||||
- Warranty protection.
|
||||
- Finding, Recommending and Investigation of free software in any
|
||||
area of the customers choise.
|
||||
area of the customer's choice.
|
||||
- Regular consulting.
|
||||
|
||||
Rates: For software items, request our price list.
|
||||
@ -1118,7 +1118,7 @@ Rates: For software items, request our price list.
|
||||
|
||||
Updated: 1997-05-12
|
||||
|
||||
Jon Solomon <jsol@gnu.ai.mit.edu>
|
||||
Jon Solomon <jsol@gnu.org>
|
||||
235 Main St., Apt 3C-1
|
||||
East Hartford, Conn. 06118
|
||||
+1 860 895-8289
|
||||
@ -1126,7 +1126,7 @@ Updated: 1997-05-12
|
||||
Maintains all GNU software... Available for General Consulting
|
||||
(contact me if you are interested)...
|
||||
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
|
||||
work... (I only charge for the time it takes to do the above,
|
||||
the software (and most GNU copyleft'd software) is free.
|
||||
@ -1162,7 +1162,7 @@ WHEN CONTACTING ME, DO THIS :-
|
||||
1) Tell me Immediately, Are You:
|
||||
A) Expecting to pay my bill for professional consultancy.
|
||||
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
|
||||
info. from the net. (No I will not incur bills phoning you back).
|
||||
3) Speak English if you want free advice ! I speak German, &
|
||||
@ -1170,7 +1170,7 @@ WHEN CONTACTING ME, DO THIS :-
|
||||
|
||||
Updated: 1997-05-15
|
||||
|
||||
Richard M. Stallman <rms@gnu.ai.mit.edu>
|
||||
Richard M. Stallman <rms@gnu.org>
|
||||
545 Tech Sq, Rm 430
|
||||
Cambridge, MA 02139
|
||||
|
||||
@ -1191,7 +1191,7 @@ Phone: (408) 978-1407
|
||||
Fax: (408) 978-1417
|
||||
|
||||
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
|
||||
also do ongoing support and periodic upgrades if you get on my GNU
|
||||
software subscription list.
|
||||
@ -1314,7 +1314,7 @@ http://info.noris.de/ (German)
|
||||
Expertise:
|
||||
OS internals, esp. Linux and BSD, esp. device drivers
|
||||
Network protocol / program design and coding
|
||||
Utilities coding and maintainance
|
||||
Utilities coding and maintenance
|
||||
Program debugging, testing
|
||||
User interface design and testing
|
||||
Several programming and tool languages
|
||||
@ -1399,7 +1399,7 @@ E-mail: <zhou@opentech.co.jp>
|
||||
My profile is listed at: http://www.opentech.co.jp/~zhou/
|
||||
|
||||
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
|
||||
time-consuming.
|
||||
|
172
gcc/cexp.c
172
gcc/cexp.c
@ -25,26 +25,16 @@
|
||||
#include <setjmp.h>
|
||||
/* #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>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDLIB_H || defined (MULTIBYTE_CHARS)
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_LIMITS_H
|
||||
#ifdef HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
@ -91,12 +81,10 @@ struct arglist {
|
||||
# define HOST_WIDE_INT intmax_t
|
||||
# define unsigned_HOST_WIDE_INT uintmax_t
|
||||
# else
|
||||
# if (HOST_BITS_PER_LONG <= HOST_BITS_PER_INT \
|
||||
&& HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_INT)
|
||||
# if (HOST_BITS_PER_LONG <= HOST_BITS_PER_INT && HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_INT)
|
||||
# define HOST_WIDE_INT int
|
||||
# else
|
||||
# if (HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_LONG \
|
||||
|| ! (defined LONG_LONG_MAX || defined LLONG_MAX))
|
||||
# if (HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_LONG || ! (defined LONG_LONG_MAX || defined LLONG_MAX))
|
||||
# define HOST_WIDE_INT long
|
||||
# else
|
||||
# define HOST_WIDE_INT long long
|
||||
@ -153,11 +141,14 @@ struct arglist {
|
||||
|
||||
#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 void yyerror PROTO((char *)) __attribute__ ((noreturn));
|
||||
static HOST_WIDE_INT expression_value;
|
||||
#ifdef TEST_EXP_READER
|
||||
static int expression_signedp;
|
||||
#endif
|
||||
|
||||
static jmp_buf parse_return_error;
|
||||
|
||||
@ -168,6 +159,9 @@ static int keyword_parsing = 0;
|
||||
This is a count, since unevaluated expressions can nest. */
|
||||
static int skip_evaluation;
|
||||
|
||||
/* Nonzero means warn if undefined identifiers are evaluated. */
|
||||
static int warn_undef;
|
||||
|
||||
/* some external tables of character types */
|
||||
extern unsigned char is_idstart[], is_idchar[], is_space[];
|
||||
|
||||
@ -180,9 +174,6 @@ extern int traditional;
|
||||
/* Flag for -lang-c89. */
|
||||
extern int c89;
|
||||
|
||||
/* Flag for -Wundef. */
|
||||
extern int warn_undef;
|
||||
|
||||
#ifndef CHAR_TYPE_SIZE
|
||||
#define CHAR_TYPE_SIZE BITS_PER_UNIT
|
||||
#endif
|
||||
@ -252,7 +243,7 @@ static void integer_overflow PROTO((void));
|
||||
#define SIGNED (~0)
|
||||
#define UNSIGNED 0
|
||||
|
||||
#line 260 "cexp.y"
|
||||
#line 251 "cexp.y"
|
||||
typedef union {
|
||||
struct constant {HOST_WIDE_INT value; int signedp;} integer;
|
||||
struct name {U_CHAR *address; int length;} name;
|
||||
@ -333,10 +324,10 @@ static const short yyrhs[] = { 35,
|
||||
|
||||
#if YYDEBUG != 0
|
||||
static const short yyrline[] = { 0,
|
||||
290, 295, 296, 303, 308, 311, 313, 316, 320, 322,
|
||||
327, 332, 345, 362, 375, 381, 387, 393, 399, 402,
|
||||
405, 412, 419, 426, 433, 436, 439, 442, 445, 448,
|
||||
451, 454, 456, 459, 462, 464, 466, 474, 476, 489
|
||||
281, 291, 292, 299, 304, 307, 309, 312, 316, 318,
|
||||
323, 328, 341, 358, 371, 377, 383, 389, 395, 398,
|
||||
401, 408, 415, 422, 429, 432, 435, 438, 441, 444,
|
||||
447, 450, 452, 455, 458, 460, 462, 470, 472, 485
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -934,59 +925,64 @@ yyreduce:
|
||||
switch (yyn) {
|
||||
|
||||
case 1:
|
||||
#line 291 "cexp.y"
|
||||
{ expression_value = yyvsp[0].integer.value; ;
|
||||
#line 282 "cexp.y"
|
||||
{
|
||||
expression_value = yyvsp[0].integer.value;
|
||||
#ifdef TEST_EXP_READER
|
||||
expression_signedp = yyvsp[0].integer.signedp;
|
||||
#endif
|
||||
;
|
||||
break;}
|
||||
case 3:
|
||||
#line 297 "cexp.y"
|
||||
#line 293 "cexp.y"
|
||||
{ if (pedantic)
|
||||
pedwarn ("comma operator in operand of `#if'");
|
||||
yyval.integer = yyvsp[0].integer; ;
|
||||
break;}
|
||||
case 4:
|
||||
#line 304 "cexp.y"
|
||||
#line 300 "cexp.y"
|
||||
{ yyval.integer.value = - yyvsp[0].integer.value;
|
||||
yyval.integer.signedp = yyvsp[0].integer.signedp;
|
||||
if ((yyval.integer.value & yyvsp[0].integer.value & yyval.integer.signedp) < 0)
|
||||
integer_overflow (); ;
|
||||
break;}
|
||||
case 5:
|
||||
#line 309 "cexp.y"
|
||||
#line 305 "cexp.y"
|
||||
{ yyval.integer.value = ! yyvsp[0].integer.value;
|
||||
yyval.integer.signedp = SIGNED; ;
|
||||
break;}
|
||||
case 6:
|
||||
#line 312 "cexp.y"
|
||||
#line 308 "cexp.y"
|
||||
{ yyval.integer = yyvsp[0].integer; ;
|
||||
break;}
|
||||
case 7:
|
||||
#line 314 "cexp.y"
|
||||
#line 310 "cexp.y"
|
||||
{ yyval.integer.value = ~ yyvsp[0].integer.value;
|
||||
yyval.integer.signedp = yyvsp[0].integer.signedp; ;
|
||||
break;}
|
||||
case 8:
|
||||
#line 317 "cexp.y"
|
||||
#line 313 "cexp.y"
|
||||
{ yyval.integer.value = check_assertion (yyvsp[0].name.address, yyvsp[0].name.length,
|
||||
0, NULL_PTR);
|
||||
yyval.integer.signedp = SIGNED; ;
|
||||
break;}
|
||||
case 9:
|
||||
#line 321 "cexp.y"
|
||||
#line 317 "cexp.y"
|
||||
{ keyword_parsing = 1; ;
|
||||
break;}
|
||||
case 10:
|
||||
#line 323 "cexp.y"
|
||||
#line 319 "cexp.y"
|
||||
{ yyval.integer.value = check_assertion (yyvsp[-4].name.address, yyvsp[-4].name.length,
|
||||
1, yyvsp[-1].keywords);
|
||||
keyword_parsing = 0;
|
||||
yyval.integer.signedp = SIGNED; ;
|
||||
break;}
|
||||
case 11:
|
||||
#line 328 "cexp.y"
|
||||
#line 324 "cexp.y"
|
||||
{ yyval.integer = yyvsp[-1].integer; ;
|
||||
break;}
|
||||
case 12:
|
||||
#line 333 "cexp.y"
|
||||
#line 329 "cexp.y"
|
||||
{ yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp;
|
||||
if (yyval.integer.signedp)
|
||||
{
|
||||
@ -1001,7 +997,7 @@ case 12:
|
||||
* yyvsp[0].integer.value); ;
|
||||
break;}
|
||||
case 13:
|
||||
#line 346 "cexp.y"
|
||||
#line 342 "cexp.y"
|
||||
{ if (yyvsp[0].integer.value == 0)
|
||||
{
|
||||
if (!skip_evaluation)
|
||||
@ -1020,7 +1016,7 @@ case 13:
|
||||
/ yyvsp[0].integer.value); ;
|
||||
break;}
|
||||
case 14:
|
||||
#line 363 "cexp.y"
|
||||
#line 359 "cexp.y"
|
||||
{ if (yyvsp[0].integer.value == 0)
|
||||
{
|
||||
if (!skip_evaluation)
|
||||
@ -1035,7 +1031,7 @@ case 14:
|
||||
% yyvsp[0].integer.value); ;
|
||||
break;}
|
||||
case 15:
|
||||
#line 376 "cexp.y"
|
||||
#line 372 "cexp.y"
|
||||
{ yyval.integer.value = yyvsp[-2].integer.value + yyvsp[0].integer.value;
|
||||
yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp;
|
||||
if (overflow_sum_sign (yyvsp[-2].integer.value, yyvsp[0].integer.value,
|
||||
@ -1043,7 +1039,7 @@ case 15:
|
||||
integer_overflow (); ;
|
||||
break;}
|
||||
case 16:
|
||||
#line 382 "cexp.y"
|
||||
#line 378 "cexp.y"
|
||||
{ yyval.integer.value = yyvsp[-2].integer.value - yyvsp[0].integer.value;
|
||||
yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp;
|
||||
if (overflow_sum_sign (yyval.integer.value, yyvsp[0].integer.value,
|
||||
@ -1051,7 +1047,7 @@ case 16:
|
||||
integer_overflow (); ;
|
||||
break;}
|
||||
case 17:
|
||||
#line 388 "cexp.y"
|
||||
#line 384 "cexp.y"
|
||||
{ yyval.integer.signedp = yyvsp[-2].integer.signedp;
|
||||
if ((yyvsp[0].integer.value & yyvsp[0].integer.signedp) < 0)
|
||||
yyval.integer.value = right_shift (&yyvsp[-2].integer, -yyvsp[0].integer.value);
|
||||
@ -1059,7 +1055,7 @@ case 17:
|
||||
yyval.integer.value = left_shift (&yyvsp[-2].integer, yyvsp[0].integer.value); ;
|
||||
break;}
|
||||
case 18:
|
||||
#line 394 "cexp.y"
|
||||
#line 390 "cexp.y"
|
||||
{ yyval.integer.signedp = yyvsp[-2].integer.signedp;
|
||||
if ((yyvsp[0].integer.value & yyvsp[0].integer.signedp) < 0)
|
||||
yyval.integer.value = left_shift (&yyvsp[-2].integer, -yyvsp[0].integer.value);
|
||||
@ -1067,17 +1063,17 @@ case 18:
|
||||
yyval.integer.value = right_shift (&yyvsp[-2].integer, yyvsp[0].integer.value); ;
|
||||
break;}
|
||||
case 19:
|
||||
#line 400 "cexp.y"
|
||||
#line 396 "cexp.y"
|
||||
{ yyval.integer.value = (yyvsp[-2].integer.value == yyvsp[0].integer.value);
|
||||
yyval.integer.signedp = SIGNED; ;
|
||||
break;}
|
||||
case 20:
|
||||
#line 403 "cexp.y"
|
||||
#line 399 "cexp.y"
|
||||
{ yyval.integer.value = (yyvsp[-2].integer.value != yyvsp[0].integer.value);
|
||||
yyval.integer.signedp = SIGNED; ;
|
||||
break;}
|
||||
case 21:
|
||||
#line 406 "cexp.y"
|
||||
#line 402 "cexp.y"
|
||||
{ yyval.integer.signedp = SIGNED;
|
||||
if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp)
|
||||
yyval.integer.value = yyvsp[-2].integer.value <= yyvsp[0].integer.value;
|
||||
@ -1086,7 +1082,7 @@ case 21:
|
||||
<= yyvsp[0].integer.value); ;
|
||||
break;}
|
||||
case 22:
|
||||
#line 413 "cexp.y"
|
||||
#line 409 "cexp.y"
|
||||
{ yyval.integer.signedp = SIGNED;
|
||||
if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp)
|
||||
yyval.integer.value = yyvsp[-2].integer.value >= yyvsp[0].integer.value;
|
||||
@ -1095,7 +1091,7 @@ case 22:
|
||||
>= yyvsp[0].integer.value); ;
|
||||
break;}
|
||||
case 23:
|
||||
#line 420 "cexp.y"
|
||||
#line 416 "cexp.y"
|
||||
{ yyval.integer.signedp = SIGNED;
|
||||
if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp)
|
||||
yyval.integer.value = yyvsp[-2].integer.value < yyvsp[0].integer.value;
|
||||
@ -1104,7 +1100,7 @@ case 23:
|
||||
< yyvsp[0].integer.value); ;
|
||||
break;}
|
||||
case 24:
|
||||
#line 427 "cexp.y"
|
||||
#line 423 "cexp.y"
|
||||
{ yyval.integer.signedp = SIGNED;
|
||||
if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp)
|
||||
yyval.integer.value = yyvsp[-2].integer.value > yyvsp[0].integer.value;
|
||||
@ -1113,64 +1109,64 @@ case 24:
|
||||
> yyvsp[0].integer.value); ;
|
||||
break;}
|
||||
case 25:
|
||||
#line 434 "cexp.y"
|
||||
#line 430 "cexp.y"
|
||||
{ yyval.integer.value = yyvsp[-2].integer.value & yyvsp[0].integer.value;
|
||||
yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ;
|
||||
break;}
|
||||
case 26:
|
||||
#line 437 "cexp.y"
|
||||
#line 433 "cexp.y"
|
||||
{ yyval.integer.value = yyvsp[-2].integer.value ^ yyvsp[0].integer.value;
|
||||
yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ;
|
||||
break;}
|
||||
case 27:
|
||||
#line 440 "cexp.y"
|
||||
#line 436 "cexp.y"
|
||||
{ yyval.integer.value = yyvsp[-2].integer.value | yyvsp[0].integer.value;
|
||||
yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ;
|
||||
break;}
|
||||
case 28:
|
||||
#line 443 "cexp.y"
|
||||
#line 439 "cexp.y"
|
||||
{ skip_evaluation += !yyvsp[-1].integer.value; ;
|
||||
break;}
|
||||
case 29:
|
||||
#line 445 "cexp.y"
|
||||
#line 441 "cexp.y"
|
||||
{ skip_evaluation -= !yyvsp[-3].integer.value;
|
||||
yyval.integer.value = (yyvsp[-3].integer.value && yyvsp[0].integer.value);
|
||||
yyval.integer.signedp = SIGNED; ;
|
||||
break;}
|
||||
case 30:
|
||||
#line 449 "cexp.y"
|
||||
#line 445 "cexp.y"
|
||||
{ skip_evaluation += !!yyvsp[-1].integer.value; ;
|
||||
break;}
|
||||
case 31:
|
||||
#line 451 "cexp.y"
|
||||
#line 447 "cexp.y"
|
||||
{ skip_evaluation -= !!yyvsp[-3].integer.value;
|
||||
yyval.integer.value = (yyvsp[-3].integer.value || yyvsp[0].integer.value);
|
||||
yyval.integer.signedp = SIGNED; ;
|
||||
break;}
|
||||
case 32:
|
||||
#line 455 "cexp.y"
|
||||
#line 451 "cexp.y"
|
||||
{ skip_evaluation += !yyvsp[-1].integer.value; ;
|
||||
break;}
|
||||
case 33:
|
||||
#line 457 "cexp.y"
|
||||
#line 453 "cexp.y"
|
||||
{ skip_evaluation += !!yyvsp[-4].integer.value - !yyvsp[-4].integer.value; ;
|
||||
break;}
|
||||
case 34:
|
||||
#line 459 "cexp.y"
|
||||
#line 455 "cexp.y"
|
||||
{ skip_evaluation -= !!yyvsp[-6].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; ;
|
||||
break;}
|
||||
case 35:
|
||||
#line 463 "cexp.y"
|
||||
#line 459 "cexp.y"
|
||||
{ yyval.integer = yylval.integer; ;
|
||||
break;}
|
||||
case 36:
|
||||
#line 465 "cexp.y"
|
||||
#line 461 "cexp.y"
|
||||
{ yyval.integer = yylval.integer; ;
|
||||
break;}
|
||||
case 37:
|
||||
#line 467 "cexp.y"
|
||||
#line 463 "cexp.y"
|
||||
{ if (warn_undef && !skip_evaluation)
|
||||
warning ("`%.*s' is not defined",
|
||||
yyvsp[0].name.length, yyvsp[0].name.address);
|
||||
@ -1178,11 +1174,11 @@ case 37:
|
||||
yyval.integer.signedp = SIGNED; ;
|
||||
break;}
|
||||
case 38:
|
||||
#line 475 "cexp.y"
|
||||
#line 471 "cexp.y"
|
||||
{ yyval.keywords = 0; ;
|
||||
break;}
|
||||
case 39:
|
||||
#line 477 "cexp.y"
|
||||
#line 473 "cexp.y"
|
||||
{ struct arglist *temp;
|
||||
yyval.keywords = (struct arglist *) xmalloc (sizeof (struct arglist));
|
||||
yyval.keywords->next = yyvsp[-2].keywords;
|
||||
@ -1197,7 +1193,7 @@ case 39:
|
||||
temp->next->length = 1; ;
|
||||
break;}
|
||||
case 40:
|
||||
#line 490 "cexp.y"
|
||||
#line 486 "cexp.y"
|
||||
{ yyval.keywords = (struct arglist *) xmalloc (sizeof (struct arglist));
|
||||
yyval.keywords->name = yyvsp[-1].name.address;
|
||||
yyval.keywords->length = yyvsp[-1].name.length;
|
||||
@ -1401,7 +1397,7 @@ yyerrhandle:
|
||||
yystate = yyn;
|
||||
goto yynewstate;
|
||||
}
|
||||
#line 495 "cexp.y"
|
||||
#line 491 "cexp.y"
|
||||
|
||||
|
||||
/* During parsing of a C expression, the pointer to the next character
|
||||
@ -1610,7 +1606,7 @@ yylex ()
|
||||
It is mostly copied from c-lex.c. */
|
||||
{
|
||||
register HOST_WIDE_INT result = 0;
|
||||
register num_chars = 0;
|
||||
register int num_chars = 0;
|
||||
unsigned width = MAX_CHAR_TYPE_SIZE;
|
||||
int max_chars;
|
||||
char *token_buffer;
|
||||
@ -1968,17 +1964,20 @@ right_shift (a, b)
|
||||
/* This page contains the entry point to this file. */
|
||||
|
||||
/* Parse STRING as an expression, and complain if this fails
|
||||
to use up all of the contents of STRING. */
|
||||
/* STRING may contain '\0' bytes; it is terminated by the first '\n'
|
||||
outside a string constant, so that we can diagnose '\0' properly. */
|
||||
/* We do not support C comments. They should be removed before
|
||||
to use up all of the contents of STRING.
|
||||
STRING may contain '\0' bytes; it is terminated by the first '\n'
|
||||
outside a string constant, so that we can diagnose '\0' properly.
|
||||
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. */
|
||||
|
||||
HOST_WIDE_INT
|
||||
parse_c_expression (string)
|
||||
parse_c_expression (string, warn_undefined)
|
||||
char *string;
|
||||
int warn_undefined;
|
||||
{
|
||||
lexptr = string;
|
||||
warn_undef = warn_undefined;
|
||||
|
||||
/* if there is some sort of scanning error, just return 0 and assume
|
||||
the parsing routine has printed an error message somewhere.
|
||||
@ -2006,6 +2005,7 @@ int traditional;
|
||||
|
||||
int main PROTO((int, char **));
|
||||
static void initialize_random_junk PROTO((void));
|
||||
static void print_unsigned_host_wide_int PROTO((unsigned_HOST_WIDE_INT));
|
||||
|
||||
/* Main program for testing purposes. */
|
||||
int
|
||||
@ -2015,6 +2015,7 @@ main (argc, argv)
|
||||
{
|
||||
int n, c;
|
||||
char buf[1024];
|
||||
unsigned_HOST_WIDE_INT u;
|
||||
|
||||
pedantic = 1 < argc;
|
||||
traditional = 2 < argc;
|
||||
@ -2030,12 +2031,35 @@ main (argc, argv)
|
||||
n++;
|
||||
if (c == EOF)
|
||||
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;
|
||||
}
|
||||
|
||||
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. */
|
||||
unsigned char is_idchar[256];
|
||||
/* table to tell if char can be first char of a c identifier. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* 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.
|
||||
Contributed by H.J. Lu (hjl@nynexst.com)
|
||||
|
||||
|
@ -2,17 +2,6 @@
|
||||
|
||||
#include <arm/xm-arm.h>
|
||||
|
||||
/* xm-netbsd.h defines this */
|
||||
#ifdef HAVE_VPRINTF
|
||||
#undef HAVE_VPRINTF
|
||||
#endif
|
||||
|
||||
#ifndef SYS_SIGLIST_DECLARED
|
||||
#define SYS_SIGLIST_DECLARED
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRERROR
|
||||
#define HAVE_STRERROR
|
||||
#endif
|
||||
|
||||
#include <xm-netbsd.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Configuration for GCC for Intel i386 running Linux.
|
||||
Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
|
||||
/* Configuration for GCC for Intel i386 running Linux-based GNU systems.
|
||||
Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
|
||||
Contributed by H.J. Lu (hjl@nynexst.com)
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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.
|
||||
|
||||
@ -21,7 +21,3 @@ Boston, MA 02111-1307, USA. */
|
||||
#define USG
|
||||
|
||||
#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)
|
||||
|
@ -1,7 +1,3 @@
|
||||
#define USG
|
||||
|
||||
#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)
|
||||
|
@ -1,7 +1,6 @@
|
||||
/* Definitions of host machine for GNU compiler.
|
||||
Commodore Amiga A3000UX version.
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
Copyright (C) 1991, 1997 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
@ -22,7 +21,6 @@ Boston, MA 02111-1307, USA. */
|
||||
|
||||
#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 index strchr
|
||||
|
||||
|
@ -3,12 +3,6 @@
|
||||
|
||||
#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,
|
||||
so help it work right. */
|
||||
#ifndef __GNUC__
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* 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 <xm-linux.h>
|
||||
|
@ -3,12 +3,6 @@
|
||||
#include "m68k/xm-m68k.h"
|
||||
|
||||
#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__
|
||||
#define USE_C_ALLOCA
|
||||
|
@ -1,8 +1,3 @@
|
||||
#include "mips/xm-mips.h"
|
||||
|
||||
#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)
|
||||
|
||||
|
@ -1,11 +1,6 @@
|
||||
#include "mips/xm-mips.h"
|
||||
|
||||
#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
|
||||
#ifdef __GNUC__
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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.
|
||||
|
||||
@ -28,11 +28,3 @@ Boston, MA 02111-1307, USA. */
|
||||
#define USG
|
||||
|
||||
#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 @@
|
||||
#include "ns32k/xm-ns32k.h"
|
||||
|
||||
#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 @@
|
||||
#include "sparc/xm-sparc.h"
|
||||
|
||||
#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__
|
||||
#define USE_C_ALLOCA
|
||||
|
@ -1,7 +1,3 @@
|
||||
/* Config file for Vax running system V. */
|
||||
|
||||
#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)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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.
|
||||
|
||||
@ -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,
|
||||
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 HAVE_VPRINTF
|
||||
|
||||
#ifndef SVR3
|
||||
#define SVR3
|
||||
|
Loading…
Reference in New Issue
Block a user