extern with incomplete types

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Temples

    extern with incomplete types

    Given this code appearing in this order in one file:

    typedef struct tag type;

    extern type var;

    struct tag { int i; };

    I have some compilers that give an error on the "extern" declaration,
    complaining that "tag" is incomplete or undefined, while some
    compilers accept this code. Which is the correct behavior?

    --
    John W. Temples, III
Working...