Debian Codegraph @

gcc/testsuite/g++.dg/ext/packed9.C

raw
1 // Copyright (C) 2005 Free Software Foundation, Inc.
2 // Contributed by Nathan Sidwell 26 Apr 2005 <[email protected]>
3
4 // DR21166. unnecessary error on packed char
5
6 struct s1 {
7 char c1;
8 } __attribute__((packed));
9
10 char&
11 f(struct s1 *s)
12 {
13 return s->c1;
14 }
15
16 char *
17 g(struct s1 *s)
18 {
19 return &s->c1;
20 }