http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50602

--- Comment #15 from Markus Trippelsdorf <markus at trippelsdorf dot de> 
2012-05-02 15:18:53 UTC ---
This one is nicer (compiles without warnings):

typedef __u32;
typedef (*initcall_t) ();
struct IO_APIC_route_entry {
  __u32 dest;
}
;
struct syscore_ops {
  int (*suspend) ();
}
;
struct {
  struct IO_APIC_route_entry entry;
}
a;
int b;
struct IO_APIC_route_entry
ioapic_read_entry () {
  io_apic_read (2 * b);
  return a.entry;
}
save_ioapic_entries () {
  ioapic_read_entry ();
}
print_ICs () {
  ioapic_read_entry ();
}
initcall_t c __attribute__ ((__used__)) = print_ICs;
struct syscore_ops d = {.suspend = save_ioapic_entries };
ioapic_init_ops () {
  register_syscore_ops (&d);
}
initcall_t e __attribute__ ((__used__)) = ioapic_init_ops;

Reply via email to