[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Missing warning

From: Norman . Ulbrich
Subject: Missing warning
Date: Fri, 28 May 2004 17:57:38 +0200 (MEST)

When an action is specified for a rule, and there is no assignment to $$,
there should be a warning.

argumentlist: argument argumentlist { newList($1, $2); /* *** */}
            | /*empty*/ {$$=NULL;}

In the line with the three stars comment "$$=" is missing: the return value
of newList shall become the value of the argumentlist.
This mistake can easily happen.

My suggestion is to print a warning if a semantic action but no "$$=" is
found. The default action "$$=$1" might be wrong in many cases.

+++ Jetzt WLAN-Router für alle DSL-Einsteiger und Wechsler +++
GMX DSL-Powertarife zudem 3 Monate gratis* http://www.gmx.net/dsl

reply via email to

[Prev in Thread] Current Thread [Next in Thread]