Hi Ho!

On Thu, 2009-04-30 at 12:40 -0700, James Dennett wrote:

> [I imagine Ian is aware of this anywyay, but to try to clarify...]
> 
> At file scope, "int i;" with no initializer is a "tentative
> definition" in C, see 6.9.2/2; a tentative definition is an odd beast
> that works in some ways rather unlike other definitions (e.g., it's
> perfectly valid to have multiple tentative definitions for the same
> variable in the same file).  Informally (only) it seems fair to say
> that a tentative definition is "treated as a declaration only".  If
> you want precision though, such fudging isn't helpful.

Yup, I am aware of this.

> C++ does not have the concept of a tentative declaration:
>   int i;
>   int i;  // legal in C99, invalid as a duplicate definition in C++03
> 
> To me that's amusing when compared to:
>   typedef int j;
>   typedef int j; // legal in C++03, invalid as a duplication definition in C99

Heh, that's strange ;-)

Thanks for your further clarification :-)

> -- James

-- 
Best regards,
Eus (FSF member #4445)

In this digital era, where computing technology is pervasive, your
freedom depends on the software controlling those computing devices.

Join free software movement today! It is free as in freedom, not as in
free beer!

Join: http://www.fsf.org/jf?referrer=4445

Reply via email to