Re: More proof of errors going uncorrected among the "regs"
- From: Eric Sosman <esosman@xxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 21 Feb 2009 08:35:06 -0500
Tim Rentsch wrote:
Eric Sosman <esosman@xxxxxxxxxxxxxxxxxxxx> writes:
pete wrote:I meant that I would have recognizedThis is one of those areas of the language where my
int array[];
as a valid example
of a declaration of an object with incomplete type.
I've worked with code that had an array declared like that.
The object was defined in another translation unit.
footing is a little uncertain, but I think that a translation
unit containing `int array[];' at file scope and with no
further declaration of `array' is in error, and a diagnostic
is required.
I think not. For 'static int array[];', yes. Without the
static, there is the example in 6.9.2 p 5:
EXAMPLE 2 If at the end of the translation unit containing
int i[];
the array i still has incomplete type, the implicit initializer causes
it to have one element, which is set to zero on program startup.
Hmm. Well, as I said, "This is one of those areas of the
language where my footing is a little uncertain." Looks like
it was a good thing I said so ...
--
Eric.Sosman@xxxxxxx
--
Eric Sosman
esosman@xxxxxxxxxxxxxxxxxxxx
.
- Follow-Ups:
- Re: More proof of errors going uncorrected among the "regs"
- From: Tim Rentsch
- Re: More proof of errors going uncorrected among the "regs"
- References:
- Re: More proof of errors going uncorrected among the "regs"
- From: pete
- Re: More proof of errors going uncorrected among the "regs"
- From: Han from China
- Re: More proof of errors going uncorrected among the "regs"
- From: pete
- Re: More proof of errors going uncorrected among the "regs"
- From: Eric Sosman
- Re: More proof of errors going uncorrected among the "regs"
- From: pete
- Re: More proof of errors going uncorrected among the "regs"
- From: Eric Sosman
- Re: More proof of errors going uncorrected among the "regs"
- From: Tim Rentsch
- Re: More proof of errors going uncorrected among the "regs"
- Prev by Date: Re: Remebering the order of precedence
- Next by Date: Re: Remebering the order of precedence
- Previous by thread: Re: More proof of errors going uncorrected among the "regs"
- Next by thread: Re: More proof of errors going uncorrected among the "regs"
- Index(es):
Relevant Pages
|