Remove bogus parser grammar rule for unary &&

This appears to have been accidentally added in
d8cc75946b as part of the changes to
support C++11 rvalue references, presumably to match the existing
correct rule for unary &.

There is a non-standard GCC extension for taking the address of a label
using unary &&:

https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html

However this extension only works in an expression in a function body,
and SWIG doesn't parse the contents of function bodies so this grammar
rule isn't even providing any useful support for this extension.
This commit is contained in:
Olly Betts 2022-04-06 09:57:54 +12:00 committed by Olly Betts
commit 779d5cf57a

View file

@ -6743,10 +6743,6 @@ valexpr : exprsimple { $$ = $1; }
$$ = $2;
$$.val = NewStringf("&%s",$2.val);
}
| LAND expr {
$$ = $2;
$$.val = NewStringf("&&%s",$2.val);
}
| STAR expr {
$$ = $2;
$$.val = NewStringf("*%s",$2.val);