This is the mail archive of the
mailing list for the Kawa project.
Re: Path for void constants
- To: "Daniel Bonniot" <bonniot at cma dot ensmp dot fr>
- Subject: Re: Path for void constants
- From: Per Bothner <per at bothner dot com>
- Date: 25 Jan 2000 10:40:28 -0800
- Cc: "Kawa" <kawa at sourceware dot cygnus dot com>
- References: <firstname.lastname@example.org>
"Daniel Bonniot" <email@example.com> writes:
> First, there is a bug in QuoteExp : if value is null (like for
> QuoteExp.nullExp), getType fails. It should return pointer_type. Here's the
I'll check this in.
> Second, method Compilation.compileConstant (Object value, Target target)
> emits a warning when 'value' is Values.empty and 'target' is a StackTarget
> with a void type.
I suspect that is is the problem: You should not be using a StackTarget
with a void type. Instead use IgnoreTarget. For convenience,
you can use Target.pushValue(type) and target.returnValue(type)
to get the correct Targets.
(This is perhaps not as consistent and well-thought out as it
could be; I notice that StackTarget.compileFromStack0 does
convert a void result to Values.empty. Perhaps things would be
more consistent if IgnoreTarget inherited from StackTarget. Or