attributes in function arguments broken

Joseph S. Myers jsm28@cam.ac.uk
Wed Jan 16 14:47:00 GMT 2002


On Wed, 16 Jan 2002, Aldy Hernandez wrote:

> parmlist_or_identifiers_1:
>           parmlist_1
>         | identifiers ')' {	<-- here right?
> 
> in which case, how do i check the stack?  in parmlist_or_identifiers
> i could just check $1 != 0... how do i do this in parmlist_or_identifiers_1?

There.  Check $<ttype>-1.  ($1 is the value of identifiers, $0 is the
(non-)value of the action in parmlist_or_identifiers just before
parmlist_or_identifiers_1, $-1 is the value of maybe_attribute before
that, but you need the <ttype> to specify the type whenever you're taking
a value off the parser stack like this, or when using the value of a
mid-rule action.)

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Gcc-patches mailing list