diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-03-14 23:03:20 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-03-14 23:03:20 +0000 |
commit | 1349839c3c97d6b721c5345801de7c14bf74e34a (patch) | |
tree | 4235e0b8199bdef396864e6afaaf3dc5db24b56f /src | |
parent | 35b5509782ca7f1eff9b727f4accf0db5addea49 (diff) | |
download | postgresql-1349839c3c97d6b721c5345801de7c14bf74e34a.tar.gz postgresql-1349839c3c97d6b721c5345801de7c14bf74e34a.zip |
It seems the YYLLOC_DEFAULT macro recommended by the Bison 1.875 manual
just doesn't work with Bison 2.0 ... fix it ...
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/parser/gram.y | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index acaddb13651..1eb95199633 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.535 2006/03/14 22:48:20 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.536 2006/03/14 23:03:20 tgl Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -63,7 +63,12 @@ /* Location tracking support --- simpler than bison's default */ #define YYLLOC_DEFAULT(Current, Rhs, N) \ - Current = Rhs[1]; + do { \ + if (N) \ + (Current) = (Rhs)[1]; \ + else \ + (Current) = (Rhs)[0]; \ + } while (0) extern List *parsetree; /* final parse result is delivered here */ |