Package: bison Version: 1:2.1-0.2 Severity: minor Tags: patch When creating a c++ parser with the option %skeleton "lalr1.cc" and compiling the generated parser with -Wall both g++ 4.0 and 3.3 produces the warning In member function virtual int yy::MyParser::parse()': warning: 'yyilooka' may be used uninitialized in this function This is probably a problem with g++ not being able to detect that it's actually initialized in a if-else clause further down, or having problem with it since there's a lot of gotos in the code.
Anyway, the easy fix is to add initialization to the lalr1.cc skeleton file. See attached diff. // Erik -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.15-zem1 Locale: LANG=en_US, LC_CTYPE=sv_SE (charmap=ISO-8859-1) Versions of packages bison depends on: ii libc6 2.3.6-1 GNU C Library: Shared libraries an ii m4 1.4.4-1 a macro processing language Versions of packages bison recommends: pn bison-doc <none> (no description available) -- no debconf information
--- /usr/share/bison/lalr1.cc-ORG 2006-02-23 00:11:05.000000000 +0100 +++ /usr/share/bison/lalr1.cc 2006-02-23 00:24:19.000000000 +0100 @@ -512,7 +512,7 @@ { /* Look-ahead and look-ahead in internal form. */ int yylooka; - int yyilooka; + int yyilooka = 0; /// Semantic value of the look-ahead. semantic_type yylval;