>From: Tom <rdorgan@worldnet.att.net>
>Date: Mon, 23 Jun 1997 08:46:09 -0600
>X-Informix-List-Id: <news.39530>
>
>Im running esql 5.08UC1. I have the following code:
>#define DAYSIZE 2
>static $char lsun[DAYSIZE];
>static $char lmon[DAYSIZE];
>
>I get the following:
>sqlc: "wbatchctl.ec", line 246: Warning -33208: Runtime error is
>possible because size of 'lsun' is unknown.
>esqlc: "wbatchctl.ec", line 246: Warning -33208: Runtime error is
>possible because size of 'lmon' is unknown.
It is a pain! It is also logged as bug B69092 because I entered it in
PTS, the Problem Tracking System, in January 1997. I have had one of the
maintenance developers contact me about it, but as far as I can tell, it
has not been fixed in any release. Of course, the fact that no customer
has reported it as a bug doesn't help -- internally reported bugs are not
treated as urgent when the person reporting them does not work in the
development team for the product and it doesn't actually cause a program
to fail.
>How can I get rid of this?
The best way I know of dealing with this is to use the '-nowarn' option;
the alternative is to ignore the warning message.
>Also, If I define as follows:
>static $char lsun[wbatchctl::DAYSIZE];
>static $char lmon[wbatchctl::DAYSIZE];
>where wbatchctl::DAYSIZE is a public enum, I get the same error. I'm just
>trying to localize my declarations as enhances maintainability.
This is C++. This won't work until either one of the proposed fixes is
put in place (treat all array dimensions as known and let the C/C++
compiler complain if they are not), or we get a full ESQL/C++.
As a matter of interest, Tom, how are you doing your ESQL/C with C++
compilations? Are you using any of the stuff I've published, or are you
using something else? If something else, can I see what you're using?
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>