projects
/
gcc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dump when SLP analysis fails due to shared vectype mismatch
[gcc.git]
/
intl
/
plural.c
diff --git
a/intl/plural.c
b/intl/plural.c
index 3a4fa20cae94ad2fba00dcf4686a55b67a6c4f5d..f9a8faa783883269f35e7c6becfdf93da07bdaba 100644
(file)
--- a/
intl/plural.c
+++ b/
intl/plural.c
@@
-19,7
+19,7
@@
#line 1 "plural.y"
/* Expression parsing for plural form selection.
#line 1 "plural.y"
/* Expression parsing for plural form selection.
- Copyright (C) 2000
, 2001
Free Software Foundation, Inc.
+ Copyright (C) 2000
-2020
Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
This program is free software; you can redistribute it and/or modify it
Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
This program is free software; you can redistribute it and/or modify it
@@
-34,7
+34,7
@@
You should have received a copy of the GNU Library General Public
License along with this program; if not, write to the Free Software
You should have received a copy of the GNU Library General Public
License along with this program; if not, write to the Free Software
- Foundation, Inc., 5
9 Temple Place - Suite 330, Boston, MA 02111-1307
,
+ Foundation, Inc., 5
1 Franklin Street - Fifth Floor, Boston, MA 02110-1301
,
USA. */
/* The bison generated parser uses alloca. AIX 3 forces us to put this
USA. */
/* The bison generated parser uses alloca. AIX 3 forces us to put this
@@
-59,10
+59,12
@@
# define __gettextparse PLURAL_PARSE
#endif
# define __gettextparse PLURAL_PARSE
#endif
+#ifndef USE_BISON3
#define YYLEX_PARAM &((struct parse_args *) arg)->cp
#define YYPARSE_PARAM arg
#define YYLEX_PARAM &((struct parse_args *) arg)->cp
#define YYPARSE_PARAM arg
+#endif
-#line
49
"plural.y"
+#line
54
"plural.y"
#ifndef YYSTYPE
typedef union {
unsigned long int num;
#ifndef YYSTYPE
typedef union {
unsigned long int num;
@@
-72,7
+74,7
@@
typedef union {
# define YYSTYPE yystype
# define YYSTYPE_IS_TRIVIAL 1
#endif
# define YYSTYPE yystype
# define YYSTYPE_IS_TRIVIAL 1
#endif
-#line
55
"plural.y"
+#line
60
"plural.y"
/* Prototypes for local functions. */
static struct expression *new_exp PARAMS ((int nargs, enum operator op,
/* Prototypes for local functions. */
static struct expression *new_exp PARAMS ((int nargs, enum operator op,
@@
-87,8
+89,13
@@
static inline struct expression *new_exp_3 PARAMS ((enum operator op,
struct expression *bexp,
struct expression *tbranch,
struct expression *fbranch));
struct expression *bexp,
struct expression *tbranch,
struct expression *fbranch));
+#ifdef USE_BISON3
+static int yylex PARAMS ((YYSTYPE *lval, struct parse_args *arg));
+static void yyerror PARAMS ((struct parse_args *arg, const char *str));
+#else
static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
static void yyerror PARAMS ((const char *str));
static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
static void yyerror PARAMS ((const char *str));
+#endif
/* Allocation of expressions. */
/* Allocation of expressions. */
@@
-236,8
+243,8
@@
static const short yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const short yyrline[] =
{
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const short yyrline[] =
{
- 0, 1
74, 182, 186, 190, 194, 198, 202, 206, 21
0,
- 2
14, 218, 22
3
+ 0, 1
84, 192, 196, 200, 204, 208, 212, 216, 22
0,
+ 2
24, 228, 23
3
};
#endif
};
#endif
@@
-1027,7
+1034,7
@@
yyreduce:
switch (yyn) {
case 1:
switch (yyn) {
case 1:
-#line 1
7
5 "plural.y"
+#line 1
8
5 "plural.y"
{
if (yyvsp[0].exp == NULL)
YYABORT;
{
if (yyvsp[0].exp == NULL)
YYABORT;
@@
-1035,68
+1042,68
@@
case 1:
}
break;
case 2:
}
break;
case 2:
-#line 1
8
3 "plural.y"
+#line 1
9
3 "plural.y"
{
yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 3:
{
yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 3:
-#line 1
8
7 "plural.y"
+#line 1
9
7 "plural.y"
{
yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 4:
{
yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 4:
-#line
19
1 "plural.y"
+#line
20
1 "plural.y"
{
yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 5:
{
yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 5:
-#line
19
5 "plural.y"
+#line
20
5 "plural.y"
{
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 6:
{
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 6:
-#line
19
9 "plural.y"
+#line
20
9 "plural.y"
{
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 7:
{
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 7:
-#line 2
0
3 "plural.y"
+#line 2
1
3 "plural.y"
{
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 8:
{
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 8:
-#line 2
0
7 "plural.y"
+#line 2
1
7 "plural.y"
{
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 9:
{
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 9:
-#line 2
1
1 "plural.y"
+#line 2
2
1 "plural.y"
{
yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
}
break;
case 10:
{
yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
}
break;
case 10:
-#line 2
1
5 "plural.y"
+#line 2
2
5 "plural.y"
{
yyval.exp = new_exp_0 (var);
}
break;
case 11:
{
yyval.exp = new_exp_0 (var);
}
break;
case 11:
-#line 2
1
9 "plural.y"
+#line 2
2
9 "plural.y"
{
if ((yyval.exp = new_exp_0 (num)) != NULL)
yyval.exp->val.num = yyvsp[0].num;
}
break;
case 12:
{
if ((yyval.exp = new_exp_0 (num)) != NULL)
yyval.exp->val.num = yyvsp[0].num;
}
break;
case 12:
-#line 2
2
4 "plural.y"
+#line 2
3
4 "plural.y"
{
yyval.exp = yyvsp[-1].exp;
}
{
yyval.exp = yyvsp[-1].exp;
}
@@
-1334,7
+1341,7
@@
yyreturn:
#endif
return yyresult;
}
#endif
return yyresult;
}
-#line 2
2
9 "plural.y"
+#line 2
3
9 "plural.y"
void
void
@@
-1365,11
+1372,20
@@
FREE_EXPRESSION (exp)
}
}
+#ifdef USE_BISON3
+static int
+yylex (lval, arg)
+ YYSTYPE *lval;
+ struct parse_args *arg;
+{
+ const char **pexp = &arg->cp;
+#else
static int
yylex (lval, pexp)
YYSTYPE *lval;
const char **pexp;
{
static int
yylex (lval, pexp)
YYSTYPE *lval;
const char **pexp;
{
+#endif
const char *exp = *pexp;
int result;
const char *exp = *pexp;
int result;
@@
-1510,8
+1526,14
@@
yylex (lval, pexp)
}
}
+#ifdef USE_BISON3
+static void
+yyerror (arg, str)
+ struct parse_args *arg;
+#else
static void
yyerror (str)
static void
yyerror (str)
+#endif
const char *str;
{
/* Do nothing. We don't print error messages here. */
const char *str;
{
/* Do nothing. We don't print error messages here. */