Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd77df81

Browse files
committed
Got tired of waiting for spoonbill's compiler to get fixed. Let's
see if using an intermediate variable avoids the gcc bug.
1 parent87e8014 commitd77df81

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

‎contrib/seg/segparse.y

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@
1111

1212
externintseg_yylex(void);
1313

14-
externintsignificant_digits(char *str );/* defined in seg.c*/
14+
externintsignificant_digits(char *str);/* defined in seg.c*/
1515

1616
voidseg_yyerror(constchar *message);
1717
intseg_yyparse(void *result);
1818

19-
floatseg_atof(char *value);
19+
staticfloatseg_atof(char *value);
2020

21-
long threshold;
22-
char strbuf[25] = {
21+
staticchar strbuf[25] = {
2322
'0','0','0','0','0',
2423
'0','0','0','0','0',
2524
'0','0','0','0','0',
@@ -108,30 +107,39 @@ range:
108107

109108
boundary:
110109
SEGFLOAT {
111-
$$.ext ='\0';
112-
$$.sigd = significant_digits($1);
113-
$$.val = seg_atof($1);
110+
/* temp variable avoids a gcc 3.3.x bug on Sparc64*/
111+
float val = seg_atof($1);
112+
113+
$$.ext ='\0';
114+
$$.sigd = significant_digits($1);
115+
$$.val = val;
114116
}
115117
|
116118
EXTENSIONSEGFLOAT {
117-
$$.ext =$1[0];
118-
$$.sigd = significant_digits($2);
119-
$$.val = seg_atof($2);
119+
/* temp variable avoids a gcc 3.3.x bug on Sparc64*/
120+
float val = seg_atof($2);
121+
122+
$$.ext =$1[0];
123+
$$.sigd = significant_digits($2);
124+
$$.val = val;
120125
}
121126
;
122127

123128
deviation:
124129
SEGFLOAT {
125-
$$.ext ='\0';
126-
$$.sigd = significant_digits($1);
127-
$$.val = seg_atof($1);
130+
/* temp variable avoids a gcc 3.3.x bug on Sparc64*/
131+
float val = seg_atof($1);
132+
133+
$$.ext ='\0';
134+
$$.sigd = significant_digits($1);
135+
$$.val = val;
128136
}
129137
;
130138

131139
%%
132140

133141

134-
float
142+
staticfloat
135143
seg_atof(char *value)
136144
{
137145
Datum datum;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp