pike.git/
src/
program.c
Branch:
Tag:
Non-build tags
All tags
No tags
2008-02-03
2008-02-03 18:08:51 by Henrik Grubbström (Grubba) <grubba@grubba.org>
01c479ee3e0c531b4d2cab9fa0c9132a6cfde424 (
20
lines) (+
13
/-
7
)
[
Show
|
Annotate
]
Branch:
7.9
Reduce the number of warnings somewhat...
Rev: src/program.c:1.647
2:
|| This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: program.c,v 1.
646
2008/02/
02
14
:
27
:
50
grubba Exp $
+
|| $Id: program.c,v 1.
647
2008/02/
03
18
:
08
:
51
grubba Exp $
*/ #include "global.h"
2044:
YYTE_IS_WARNING); } } else {
-
/* Variable or constant. */
+
struct identifier *new_id;
+
/* Variable or constant.
+
*
+
* Note: Use weaker check for integers.
+
*
/
if (!pike_types_le(sub_id->type,
-
ID_FROM_PTR(Pike_compiler->new_program,
-
new_ref)->type)) {
+
(new_id =
ID_FROM_PTR(Pike_compiler->new_program,
+
new_ref)
)
->type)
&&
+
!((i->run_time_type == PIKE_T_INT
)
&&
+
(new_id->run_time_type == PIKE_T_INT) &&
+
match_types(sub_id->type, new_id->type)))
{
yywarning("Type mismatch when overloading %S.", name);
-
yyexplain_nonmatching_types(sub_id->type,
-
ID_FROM_PTR(Pike_compiler->
new_
program,
-
new_ref)
->type,
+
yyexplain_nonmatching_types(sub_id->type, new_
id
->type,
YYTE_IS_WARNING); } }