spurious ESQL warning about DATETIME

spurious ESQL warning about DATETIME

Post by World's Largest Leprecha » Tue, 10 Oct 1995 04:00:00




>    EXEC SQL BEGIN DECLARE SECTION;
>    struct bowwowtype
>    {
>        char bow[4][5];
>        datetime year to day wow;
>    } bowwow;
>    EXEC SQL END DECLARE SECTION;

> The compiler complains that the DATETIME field is unqualified, even though
> the "datetime" type is qualified by "year to day".

I just found that the compiler issues the same warning if the struct itself
is in a two-dimensional array:

        $struct
        {
                datetime year to hour bow;
                long wow;
        } bowwow[4][5];

This can only be a bug.

-:-
        "This rock, for instance, has an I.Q. of zero.  Ouch!"
        "What's the matter, Professor?"
        "It bit me!"
--
G. L. Sicherman

 
 
 

spurious ESQL warning about DATETIME

Post by The National Folk Hero of the N » Tue, 10 Oct 1995 04:00:00


We're getting spurious warnings about DATETIME qualifiers with E.S.Q.L. 7.10.

        EXEC SQL BEGIN DECLARE SECTION;
        struct bowwowtype
        {
            char bow[4][5];
            datetime year to day wow;
        } bowwow;
        EXEC SQL END DECLARE SECTION;

The compiler complains that the DATETIME field is unqualified, even though
the "datetime" type is qualified by "year to day".

Using the old dollarsign syntax makes no difference.  Reversing the order
of the fields in the struct makes no difference.  Making the struct
nameless makes no difference.

Reducing the array "bow" to one dimension makes the warning go away!

Are we doing something wrong, or is it a Bothersome Unauthorized Grotesquerie?

-:-
        "The Surgeon General of Australia has determined that
         canned wombat is every bit as nutritious as fresh."
--
Col. G. L. Sicherman


 
 
 

1. Spurious warning in 4GL-generated C code?

I just imported several ABF/4GL applications from 6.4/04 to OpenIngres
1.1 (sos.us5/02) and notices that the compilation steps produce quite a
few warings of the form:

        framename.c, line nnnn: warning: statement cannot be reached.

Upon examining the generated C code, I found about half of the warnings
were from a sequence of generated code like this:

        goto someplace;
        goto IIosl219;          <=== The warning is for this line

IIosl219:;

The 4GL code sequence which generates this code is of the form:

        'MenuItem' (Explanation = 'explanation') =
            BEGIN
                ReturnCode = CALLRAME framename (CompanyName = :CompanyNAme);
                IF  ReturnCode = 98
                    THEN RETURN 98; <=== This generates the flagged C code
                ENDIF;
            END

or

        'Shell' (Explanation = 'explanation') = <=== This statement generates
            BEGIN                                    the flagged code
                CALL SYSTEM;
            END

The application SEEMS to run OK but I sure sould like to know what is
going on here.  Please not, compilation under 6.4/04 ABF/4GL did not
generate these warnings.  (The application was moved using copydb with
the "-c" flag.  The "create table", "create index" and "modify"
statements were deleted from the cp_ingre._in file as they already
existed and I didn't want to mess up anything already done in OI 1.1 from
a 6.4 copy file.  )

Any ideas, comments, etc.?
Lucky

Lucky Leavell                            Phone: (812) 945-6555
Relational Information Systems, Inc.       FAX: (812) 949-9233

New Albany, IN 47150-2013                       71534,2674 (CompuServe)
                                 WWW Home Page:  http://wl.iglou.com/ris

2. US-MD-DEVELOPER

3. WARNING WARNING WARNING

4. Pass string with apostrophe in sql?

5. Unwarrented warning from ESQL/C 5.00

6. TreeView

7. Linker warnings with ESQL/C version 7.31UC3 and GCC 2.8.1

8. Virginia - DB2/Oracle Database Administrator

9. 5.0 esql/c warning -33208 - Question?

10. comparing datetime in esql/c

11. ESQL/C DATETIME Manipulation question

12. Function to convert ESQL datetime to unix time_t?

13. ESQL/C, sqlda, and datetime columns