summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-03-11 15:44:40 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-03-11 17:23:31 +0200
commit2f418e8a174136507fb1f80214415b144e24850c (patch)
treea0fff709f5992d678ecf0419114b8d5762c26425
parentb42225c101e61afdc9b4f5873654bc1e0c9f9179 (diff)
In ecpg preprocessor, don't try to look up constants in the test for
variable hiding. A constant is not a variable. It worked in most cases by accident, because we add constants to the global list of variables (why?), but float constants like 1.23 were interpreted as struct field references, and not found. Backpatch to 9.0, where the test for variable hiding was added.
-rw-r--r--src/interfaces/ecpg/preproc/type.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/preproc/type.c b/src/interfaces/ecpg/preproc/type.c
index eb7d4aeb9bc..1b8a2a698f4 100644
--- a/src/interfaces/ecpg/preproc/type.c
+++ b/src/interfaces/ecpg/preproc/type.c
@@ -245,7 +245,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type, const int bra
struct variable *var;
if (type->type != ECPGt_descriptor && type->type != ECPGt_sqlda &&
- type->type != ECPGt_char_variable &&
+ type->type != ECPGt_char_variable && type->type != ECPGt_const &&
brace_level >= 0)
{
char *str;