This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
The attached patch fixes the following warnings
../../gcc/gcc/treelang/parse.y: In function yyparse:
../../gcc/gcc/treelang/parse.y:532: warning: too many arguments for format
../../gcc/gcc/treelang/parse.y:641: warning: conversion lacks type at end of
format
I am not sure if this is the best fix. I could not find much documentation
about the syntax of the format string of "error" and "warning". Because of
this, I have used similar messages present in other parts of gcc as examples.
bootstrapped and tested (make check-treelang) in i686.
Rafael
2005-09-13 Rafael Ãvila de EspÃndola <rafael.espindola@gmail.com>
* parse.y : Fixed two compile warnings in "error" and
"warning" invocations
Index: gcc/treelang/parse.y
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/treelang/parse.y,v
retrieving revision 1.27
diff -c -3 -p -r1.27 parse.y
*** gcc/treelang/parse.y 25 Jun 2005 00:59:41 -0000 1.27
--- gcc/treelang/parse.y 17 Sep 2005 03:21:37 -0000
*************** tl_RETURN expression_opt {
*** 528,535 ****
else
{
warning (0, "%HRedundant expression in return.",
! &ret_tok->tp.tok.location, ret_tok->tp.tok.length,
! ret_tok->tp.tok.chars);
tree_code_generate_return (type_prod->tp.pro.code, NULL);
}
else
--- 528,534 ----
else
{
warning (0, "%HRedundant expression in return.",
! &ret_tok->tp.tok.location);
tree_code_generate_return (type_prod->tp.pro.code, NULL);
}
else
*************** NAME LEFT_PARENTHESIS expressions_with_c
*** 637,643 ****
proto = lookup_tree_name (&search_prod);
if (!proto)
{
! error ("%HFunction prototype not found for %q.*%s.",
&tok->tp.tok.location, tok->tp.tok.length, tok->tp.tok.chars);
YYERROR;
}
--- 636,642 ----
proto = lookup_tree_name (&search_prod);
if (!proto)
{
! error ("%HFunction prototype not found for %q.*s.",
&tok->tp.tok.location, tok->tp.tok.length, tok->tp.tok.chars);
YYERROR;
}
Attachment:
pgp00000.pgp
Description: PGP signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |