OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [m-un-2.c] - Blame information for rev 713

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-W -Wall" } */
3
 
4
typedef __SIZE_TYPE__ size_t;
5
extern void* malloc (size_t);
6
extern void free (void*);
7
extern void* realloc (void*, size_t);
8
 
9
struct vtable {
10
  void* (* _malloc) (size_t);
11
  void (* _free) (void*);
12
  void* (* _realloc) (void*, size_t);
13
};
14
 
15
struct vtable mtable = {
16
  malloc,
17
  free
18
}; /* { dg-warning "missing initializer" "warning regression" { target *-*-* } {18} } */
19
   /* { dg-warning "initialization for 'mtable._realloc'" "warning regression 2" { target *-*-* } {18} } */
20
 
21
/* With designated initializers, we assume you meant to leave out the
22
   initialization of any blank fields.  */
23
struct vtable mtable2 = {
24
  ._malloc = malloc,
25
  ._realloc = realloc
26
};
27
 
28
struct vtable mtable3 = {
29
  ._free = free,
30
  ._malloc = malloc,
31
  ._realloc = realloc
32
};

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.