git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 87e8014)
Got tired of waiting for spoonbill's compiler to get fixed. Let's
Thu, 1 Jun 2006 02:39:59 +0000 (02:39 +0000)
Thu, 1 Jun 2006 02:39:59 +0000 (02:39 +0000)
see if using an intermediate variable avoids the gcc bug.


diff --git a/contrib/seg/segparse.y b/contrib/seg/segparse.y
index d4d739c621cd7412ea2522351e0f4436bd1ec16a..dc56fb580feecdd05b69d3405ae95bdde4a35e5b 100644 (file)
--- a/contrib/seg/segparse.y
+++ b/contrib/seg/segparse.y
@@ -11,15 +11,14 @@
extern int seg_yylex(void);
- extern int significant_digits( char *str ); /* defined in seg.c */
+ extern int significant_digits(char *str); /* defined in seg.c */
void seg_yyerror(const char *message);
int seg_yyparse(void *result);
- float seg_atof( char *value );
+ static float seg_atof(char *value);
- long threshold;
- char strbuf[25] = {
+ static char strbuf[25] = {
'0', '0', '0', '0', '0',
'0', '0', '0', '0', '0',
'0', '0', '0', '0', '0',
@@ -108,30 +107,39 @@ range:
boundary:
SEGFLOAT {
- $$.ext = '0円';
- $$.sigd = significant_digits(1ドル);
- $$.val = seg_atof(1ドル);
+ /* temp variable avoids a gcc 3.3.x bug on Sparc64 */
+ float val = seg_atof(1ドル);
+
+ $$.ext = '0円';
+ $$.sigd = significant_digits(1ドル);
+ $$.val = val;
}
|
EXTENSION SEGFLOAT {
- $$.ext = 1ドル[0];
- $$.sigd = significant_digits(2ドル);
- $$.val = seg_atof(2ドル);
+ /* temp variable avoids a gcc 3.3.x bug on Sparc64 */
+ float val = seg_atof(2ドル);
+
+ $$.ext = 1ドル[0];
+ $$.sigd = significant_digits(2ドル);
+ $$.val = val;
}
;
deviation:
SEGFLOAT {
- $$.ext = '0円';
- $$.sigd = significant_digits(1ドル);
- $$.val = seg_atof(1ドル);
+ /* temp variable avoids a gcc 3.3.x bug on Sparc64 */
+ float val = seg_atof(1ドル);
+
+ $$.ext = '0円';
+ $$.sigd = significant_digits(1ドル);
+ $$.val = val;
}
;
%%
-float
+static float
seg_atof(char *value)
{
Datum datum;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /