Commit 51f8493d by Bruno Haible Committed by Jeff Law

m-un-2.c: New test.

        * gcc.misc-tests/m-un-2.c: New test.
        * g++.old-deja/g++.other/warn01.c: Likewise.

From-SVN: r20615
parent 9dfcc8db
Fri Jun 19 23:26:12 1998 Bruno Haible <haible@ilog.fr>
* gcc.misc-tests/m-un-2.c: New test.
* g++.old-deja/g++.other/warn01.c: Likewise.
Fri Jun 19 14:06:36 1998 Robert Lipe <robertl@dgii.com>
* gcc.dg/980414-1.c: Move comments outside of ASM to improve
......
// Build don't link:
// Special g++ Options: -W -Wall
typedef unsigned long size_t;
extern void* malloc (size_t);
extern void free (void*);
extern void* realloc (void*, size_t);
struct vtable {
void* (* _malloc) (size_t);
void (* _free) (void*);
void* (* _realloc) (void*, size_t);
};
struct vtable mtable = { malloc, free }; // WARNING - _realloc
/* { dg-do compile } */
/* { dg-options "-W -Wall" } */
typedef unsigned long size_t;
extern void* malloc (size_t);
extern void free (void*);
extern void* realloc (void*, size_t);
struct vtable {
void* (* _malloc) (size_t);
void (* _free) (void*);
void* (* _realloc) (void*, size_t);
};
struct vtable mtable = {
malloc,
free
}; /* { dg-warning "missing initializer for `mtable._realloc'" "warning regression" } */
struct vtable mtable2 = {
._malloc = malloc,
._realloc = realloc
}; /* { dg-warning "missing initializer for `mtable2._free'" "warning regression" } */
struct vtable mtable3 = {
._free = free,
._malloc = malloc,
._realloc = realloc
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment