KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q44640: QuickC Incorrectly Complains Struct/Union Undefined

Article: Q44640
Product(s): See article
Version(s): 2.00
Operating System(s): MS-DOS
Keyword(s): ENDUSER | buglist2.00 | mspl13_c
Last Modified: 25-MAY-1989

In the example below the structure declaration compiles correctly;
however, when a variable is defined using the defined type, QuickC
2.00 incorrectly produces the following error:

   error C2079: 'this' uses undefined struct/union 'foo'

Microsoft C Version 5.10 produces the correct error as follows:

   error C2035: enum/struct/union 'array' unknown size

Program example
---------------

struct foo
{
     struct
     {
          char val;

     } array[];
};

struct foo this;

void main(void)
{

}

Microsoft has confirmed this to be a problem in Version 2.00 of the
QuickC Compiler. We are researching this problem and will post new
information as soon as it becomes available.

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.