+2004-02-23 Eric Botcazou <ebotcazou@libertysurf.fr>
+ Falk Hueffner <falk@debian.org>
+
+ PR c/14188
+ * builtins.c (expand_builtin_va_arg): Emit an informative message
+ if a trap is generated.
+ * c-typeck.c (build_function_call): Likewise.
+
2004-02-22 Jakub Jelinek <jakub@redhat.com>
* gcov-io.c (gcov_open) [GCOV_LOCKED]: Use open + fdopen instead of
/* We can, however, treat "undefined" any way we please.
Call abort to encourage the user to fix the program. */
+ inform ("if this code is reached, the program will abort");
expand_builtin_trap ();
/* This is dead code, but go ahead and finish so that the
executions of the program must execute the code. */
warning ("function called through a non-compatible type");
+ /* We can, however, treat "undefined" any way we please.
+ Call abort to encourage the user to fix the program. */
+ inform ("if this code is reached, the program will abort");
+
if (VOID_TYPE_P (return_type))
return trap;
else
+2004-02-23 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * gcc.dg/cast-function-1.c: Adjust for new informative message.
+ * gcc.dg/va-arg-1.c: Likewise.
+
2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14143
int i;
str_t s;
- d = ((double (*) (int)) foo1) (i); /* { dg-warning "non-compatible" } */
- i = ((int (*) (double)) foo1) (d); /* { dg-warning "non-compatible" } */
- s = ((str_t (*) (int)) foo1) (i); /* { dg-warning "non-compatible" } */
- ((void (*) (int)) foo1) (d); /* { dg-warning "non-compatible" } */
- i = ((int (*) (int)) foo1) (i); /* { dg-bogus "non-compatible" } */
- (void) foo1 (i); /* { dg-bogus "non-compatible" } */
-
- d = ((double (*) (int)) foo2) (i); /* { dg-warning "non-compatible" } */
- i = ((int (*) (double)) foo2) (d); /* { dg-bogus "non-compatible" } */
- s = ((str_t (*) (int)) foo2) (i); /* { dg-warning "non-compatible" } */
- ((void (*) (int)) foo2) (d); /* { dg-warning "non-compatible" } */
- i = ((int (*) (int)) foo2) (i); /* { dg-bogus "non-compatible" } */
- (void) foo2 (i); /* { dg-bogus "non-compatible" } */
+ d = ((double (*) (int)) foo1) (i); /* { dg-warning "non-compatible|abort" } */
+ i = ((int (*) (double)) foo1) (d); /* { dg-warning "non-compatible|abort" } */
+ s = ((str_t (*) (int)) foo1) (i); /* { dg-warning "non-compatible|abort" } */
+ ((void (*) (int)) foo1) (d); /* { dg-warning "non-compatible|abort" } */
+ i = ((int (*) (int)) foo1) (i); /* { dg-bogus "non-compatible|abort" } */
+ (void) foo1 (i); /* { dg-bogus "non-compatible|abort" } */
+
+ d = ((double (*) (int)) foo2) (i); /* { dg-warning "non-compatible|abort" } */
+ i = ((int (*) (double)) foo2) (d); /* { dg-bogus "non-compatible|abort" } */
+ s = ((str_t (*) (int)) foo2) (i); /* { dg-warning "non-compatible|abort" } */
+ ((void (*) (int)) foo2) (d); /* { dg-warning "non-compatible|abort" } */
+ i = ((int (*) (int)) foo2) (i); /* { dg-bogus "non-compatible|abort" } */
+ (void) foo2 (i); /* { dg-bogus "non-compatible|abort" } */
}
int foo1(int arg)
void foo()
{
- i = va_arg(v, char); /* { dg-warning "is promoted to|so you should" "char" } */
- i = va_arg(v, short); /* { dg-warning "is promoted to" "short" } */
- i = va_arg(v, float); /* { dg-warning "is promoted to" "float" } */
+ i = va_arg(v, char); /* { dg-warning "is promoted to|so you should|abort" "char" } */
+ i = va_arg(v, short); /* { dg-warning "is promoted to|abort" "short" } */
+ i = va_arg(v, float); /* { dg-warning "is promoted to|abort" "float" } */
}