+2008-11-17 Di-an Jan <dianj@freeshell.org>
+
+ Handles several --enable-gcc-warnings.
+ * src/getargs.c (command_line_location): Set parameters to void.
+ * src/output.c (symbol_type_name_cmp): Make static.
+ (symbols_by_type_name): Set parameters to void.
+ (symbol_definitions_output): Remove unused parameter. Rename as...
+ (prepare_symbol_definitions): this.
+ (muscles_output): Move symbol_definitions_output to...
+ (output): here as prepare_symbol_definitions.
+ * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
+ (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
+
2008-11-17 Di-an Jan <dianj@freeshell.org>
* tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
| Compare two symbols by type-name, and then by number. |
`-------------------------------------------------------*/
-int
+static int
symbol_type_name_cmp (const symbol **lhs, const symbol **rhs)
{
int res = UNIQSTR_CMP((*lhs)->type_name, (*rhs)->type_name);
`----------------------------------------------------------------*/
static symbol **
-symbols_by_type_name ()
+symbols_by_type_name (void)
{
typedef int (*qcmp_type) (const void *, const void *);
symbol **res = xmemdup (symbols, nsyms * sizeof *res);
}
-/*---------------------------------------.
-| Output the symbol definitions to OUT. |
-`---------------------------------------*/
+/*---------------------------------------------.
+| Prepare the muscles for symbol definitions. |
+`---------------------------------------------*/
static void
-symbol_definitions_output (FILE *out)
+prepare_symbol_definitions (void)
{
int i;
for (i = 0; i < nsyms; ++i)
merger_output (out);
symbol_code_props_output (out, "destructors", &symbol_destructor_get);
symbol_code_props_output (out, "printers", &symbol_printer_get);
- symbol_definitions_output (out);
symbol_numbers_output (out);
token_definitions_output (out);
type_names_output (out);
prepare_rules ();
prepare_states ();
prepare_actions ();
+ prepare_symbol_definitions ();
prepare ();
}
int
-main(int argc, char *argv[])
+main (void)
{
yy::parser p;
p.set_debug_level(!!getenv("YYDEBUG"));
%code {
// YYSTYPE contains a namespace reference.
- int yylex (YYSTYPE *lval, const ]$1[::parser::location_type* lloc) {
+ int yylex (YYSTYPE *lval, const ]$1[::parser::location_type*) {
lval->i = 3;
return 0;
}