Nicolas BAZIN ([EMAIL PROTECTED]) reports a bug with a severity of 2 The lower the number the more severe it is.
Short Description exec sql ifdef, ... incorrect parsing Long Description When exec sql ifdef test; is used with the definition of a statement bloc, a premature EOF is reached: Sample Code Lets modify test1.pgc with static void warn(void) { fprintf(stderr, "Warning: At least one column was truncated\n"); } /* comment */ exec sql define test 1; exec sql ifdef test; exec sql define AMOUNT 6; exec sql else; exec sql define AMOUNT 7; exec sql endif; exec sql type intarray is int[AMOUNT]; exec sql type string is char(8); typedef int intarray[AMOUNT]; int main () { exec sql begin declare section; intarray amount; int increment=100; char name[AMOUNT][8]; char letter[AMOUNT][1]; exec sql ifdef test; struct name_letter_struct { char name[8]; int amount; char letter; } name_letter[AMOUNT]; exec sql endif; struct ind_struct { short a; short b; short c; } ind[AMOUNT]; char command[128]; char *connection="pm"; exec sql end declare section; exec sql var name is string(AMOUNT); char msg[128]; FILE *dbgs; int i,j; .... [postgres@CVS test]$ gmake ../preproc/ecpg -I./../include test1.pgc test1.pgc:45: ERROR: eof - Missing 'EXEC SQL ENDIF;' gmake: *** [test1.c] Error 3 gmake: *** Deleting file `test1.c' No file was uploaded with this report ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])