[K42-discussion] more fun with gcc 4

Bryan S Rosenburg rosnbrg at us.ibm.com
Wed Jul 5 22:57:05 EST 2006


Donour,

I applied the referenced patch.  Thanks.

Somewhere along the line, your patch email got mangled.  Long lines were 
split and tabs were expanded.  In the future, it might work better if you 
include your patch file as an attachment rather than embedding it inline 
in email.

- Bryan




Donour Sizemore <donour at cs.unm.edu> 
Sent by: k42-discussion-bounces+rosnbrg=us.ibm.com at ozlabs.org
06/27/2006 10:14 PM
Please respond to
Discussion about K42 <k42-discussion at ozlabs.org>


To
Discussion about K42 <k42-discussion at ozlabs.org>
cc

Subject
Re: [K42-discussion] more fun with gcc 4






Michal Ostrowski wrote:
> On Mon, 2006-06-26 at 15:45 -0600, Donour Sizemore wrote:
> 
>>> Perhaps you could try using "typeof":
>>>
>>> typeof(&foo::bar) __virtual_foo_Var1 = &foo::bar;
>>>
>>>
>>> "typeof" can be used to extract the implicit type information of a
>>> pre-declared symbol and simply define a vairable of the matching type,
>>> without ever knowing the specific type.
>>>
>>> 
>>> 
>> Will that actually work everywhere else though? I thought that the 
point 
>> of the default parameter values, that were were discussing earlier, was 

>> that you could could call members functions without actually knowing 
>> their names and type (i.e. class foo::function1).
>>
>> 
>
> The entire problem here is that you are trying to define some variable
> "__virtual_foo_Var1" to have a type matching something that will be
> assigned to it.  As you've seen it can be tricky to type out the
> typename that you want your variable to have.
>
> This solution avoids the problem of the default parameters;  should the
> default parameter values really be part of the "type" implied by the
> function, then typeof() will account for that.
> 
Ok, this actually does work I think. The git tree builds and runs 
correctly. A patch will be including in a following email.

... on to the next gcc problem

donour
_______________________________________________
K42-discussion mailing list
K42-discussion at ozlabs.org
https://ozlabs.org/mailman/listinfo/k42-discussion

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/k42-discussion/attachments/20060705/87d278d6/attachment.htm 


More information about the K42-discussion mailing list