On Aug 4, 2014, at 9:55 AM, Laszlo Ersek <ler...@redhat.com> wrote:

> On 08/04/14 17:02, Kinney, Michael D wrote:
> 
>> The incomplete types between lib class .h and lib instance is not 
>> something we done anywhere else.  I prefer the lib class .h file to 
>> be able to stand on its own.
> 
> It is able.
> 
>> Meaning it can be included by a module, but if not lib instance is
>> linked to the module, the module should still be able to compile.
> 
> It is able.
> 
> The term "incomplete type" is a term from the C standard. Incomplete
> types are the standard way to introduce the name of a type, but not its
> contents.
> 
>  6.2.5 Types
> 
>  1 The meaning of a value stored in an object or returned by a
>    function is determined by the /type/ of the expression used to
>    access it. (An identifier declared to be an object is the
>    simplest such expression; the type is specified in the declaration
>    of the identifier.) Types are partitioned into /object types/
>    (types that fully describe objects), /function types/ (types
>    that describe functions), and /incomplete types/ (types that
>    describe objects but lack information needed to determine their
>    sizes).
> 
> Please compile and run the following C program:
> 
> ----*----
> #include <stdio.h>
> 
> typedef struct HELLO_WORLD HELLO_WORLD;
> 
> int
> main(void)
> {
>  HELLO_WORLD *pointer;
> 
>  pointer = NULL;
>  fprintf(stdout, "hello world\n");
>  return pointer == NULL ? 0 : 1;
> }
> ----*----
> 
> $ gcc -ansi -pedantic -Wall -Wextra -Werror -o hello hello.c
> $ ./hello
> hello world
> $ echo $?
> 0
> 

FYI, clang works the same way for -pedantic -Wall -Wextra -Werror

Thanks,

Andrew Fish
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to