[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    [cfe-dev] sizeof(sizeof(...))
From:       clattner () apple ! com (Chris Lattner)
Date:       2007-12-19 5:31:48
Message-ID: 19851950-60D4-490B-BDBE-691481061FA8 () apple ! com
[Download RAW message or body]


On Dec 14, 2007, at 6:06 PM, Neil Booth wrote:

> Ted Kremenek wrote:-
>
>>> is this valid:
>>>
>>> char[n*m] foo(int n, int m) { ... }
>>> ...
>>> a=sizeof(foo(x,y))
>>> ?
>>
>> This (I believe) is not valid, and I couldn't get gcc to compile
>> similar code.  From the standard: "All declarations of variably
>> modi?ed (VM) types have to be either block scope or function
>> prototype scope."
>
> It's invalid for a different reason (and one clang doesn't
> implement, ahem): the return type of a function declarator
> cannot have array type.

Does now:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20071217/003489.html

Thanks,

-Chris

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic