2007-04-16
2007-04-16 12:10:31 by Henrik Grubbström (Grubba) <grubba@grubba.org>
-
d4b9ecde83b6acb41766bc1df84311cd6e11d13e
(10 lines)
(+9/-1)
[
Show
| Annotate
]
Branch: 7.9
Added warning for noop softcasts.
Rev: src/las.c:1.387
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: las.c,v 1.386 2007/04/13 17:42:22 grubba Exp $
+ || $Id: las.c,v 1.387 2007/04/16 12:10:31 grubba Exp $
*/
#include "global.h"
1652: Inside #if defined(NEW_ARG_CHECK)
t2, t1);
free_string(t2);
free_string(t1);
+ } else if (result_type == n->type) {
+ struct pike_string *t1 = describe_type(type);
+ struct pike_string *t2 = describe_type(n->type);
+ yywarning("Soft cast of %S to %S is a noop."
+ t2, t1);
+ free_string(t2);
+ free_string(t1);
}
#else /* !NEW_ARG_CHECK */
if (!check_soft_cast(type, n->type)) {