annotate gcc/testsuite/gcc.dg/Wsizeof-pointer-memaccess1.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Test -Wsizeof-pointer-memaccess warnings. */
kono
parents:
diff changeset
2 /* { dg-do compile } */
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
3 /* { dg-options "-Wall -Wno-array-bounds -Wno-sizeof-array-argument -Wno-stringop-overflow" } */
111
kono
parents:
diff changeset
4 /* { dg-require-effective-target alloca } */
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 typedef __SIZE_TYPE__ size_t;
kono
parents:
diff changeset
7 extern void bzero (void *, size_t);
kono
parents:
diff changeset
8 extern void bcopy (void *, const void *, size_t);
kono
parents:
diff changeset
9 extern int bcmp (const void *, const void *, size_t);
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 struct A { short a, b; int c, d; long e, f; };
kono
parents:
diff changeset
12 typedef struct A TA;
kono
parents:
diff changeset
13 typedef struct A *PA;
kono
parents:
diff changeset
14 typedef TA *PTA;
kono
parents:
diff changeset
15 struct B {};
kono
parents:
diff changeset
16 typedef struct B TB;
kono
parents:
diff changeset
17 typedef struct B *PB;
kono
parents:
diff changeset
18 typedef TB *PTB;
kono
parents:
diff changeset
19 typedef int X[3][3][3];
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 int
kono
parents:
diff changeset
22 f1 (void *x, int z)
kono
parents:
diff changeset
23 {
kono
parents:
diff changeset
24 struct A a, *pa1 = &a;
kono
parents:
diff changeset
25 TA *pa2 = &a;
kono
parents:
diff changeset
26 PA pa3 = &a;
kono
parents:
diff changeset
27 PTA pa4 = &a;
kono
parents:
diff changeset
28 bzero (&a, sizeof (&a)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
kono
parents:
diff changeset
29 bzero (pa1, sizeof (pa1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
30 bzero (pa2, sizeof pa2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
31 bzero (pa3, sizeof (pa3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
32 bzero (pa4, sizeof pa4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
33 bzero (pa1, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
34 bzero (pa2, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
35 bzero (pa3, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
36 bzero (pa4, sizeof (__typeof (pa4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 bcopy (x, &a, sizeof (&a)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
kono
parents:
diff changeset
39 bcopy (x, pa1, sizeof (pa1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
40 bcopy (x, pa2, sizeof pa2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
41 bcopy (x, pa3, sizeof (pa3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
42 bcopy (x, pa4, sizeof pa4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
43 bcopy (x, pa1, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
44 bcopy (x, pa2, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
45 bcopy (x, pa3, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
46 bcopy (x, pa4, sizeof (__typeof (pa4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 bcopy (&a, x, sizeof (&a)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
kono
parents:
diff changeset
49 bcopy (pa1, x, sizeof (pa1)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
kono
parents:
diff changeset
50 bcopy (pa2, x, sizeof pa2); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
kono
parents:
diff changeset
51 bcopy (pa3, x, sizeof (pa3)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
kono
parents:
diff changeset
52 bcopy (pa4, x, sizeof pa4); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
kono
parents:
diff changeset
53 bcopy (pa1, x, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
54 bcopy (pa2, x, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
55 bcopy (pa3, x, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
56 bcopy (pa4, x, sizeof (__typeof (pa4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
57
kono
parents:
diff changeset
58 z += bcmp (&a, x, sizeof (&a)); /* { dg-warning "call is the same expression as the first source; did you mean to remove the addressof" } */
kono
parents:
diff changeset
59 z += bcmp (pa1, x, sizeof (pa1)); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
kono
parents:
diff changeset
60 z += bcmp (pa2, x, sizeof pa2); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
kono
parents:
diff changeset
61 z += bcmp (pa3, x, sizeof (pa3)); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
kono
parents:
diff changeset
62 z += bcmp (pa4, x, sizeof pa4); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
kono
parents:
diff changeset
63 z += bcmp (pa1, x, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
64 z += bcmp (pa2, x, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
65 z += bcmp (pa3, x, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67 z += bcmp (x, &a, sizeof (&a)); /* { dg-warning "call is the same expression as the second source; did you mean to remove the addressof" } */
kono
parents:
diff changeset
68 z += bcmp (x, pa1, sizeof (pa1)); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
kono
parents:
diff changeset
69 z += bcmp (x, pa2, sizeof pa2); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
kono
parents:
diff changeset
70 z += bcmp (x, pa3, sizeof (pa3)); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
kono
parents:
diff changeset
71 z += bcmp (x, pa4, sizeof pa4); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
kono
parents:
diff changeset
72 z += bcmp (x, pa1, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
73 z += bcmp (x, pa2, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
74 z += bcmp (x, pa3, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
75
kono
parents:
diff changeset
76 z += bcmp (x, (&a), (sizeof (&a))); /* { dg-warning "call is the same expression as the second source; did you mean to remove the addressof" } */
kono
parents:
diff changeset
77 z += bcmp (x, (pa1), (sizeof (pa1))); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
kono
parents:
diff changeset
78 z += bcmp (x, (pa2), (sizeof pa2)); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
kono
parents:
diff changeset
79 z += bcmp (x, (pa3), (sizeof (pa3))); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
kono
parents:
diff changeset
80 z += bcmp (x, (pa4), (sizeof pa4)); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
kono
parents:
diff changeset
81 z += bcmp (x, (pa1), (sizeof (struct A *)));/* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
82 z += bcmp (x, (pa2), (sizeof (PTA))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
83 z += bcmp (x, (pa3), (sizeof (PA))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
84
kono
parents:
diff changeset
85 /* These are correct, no warning. */
kono
parents:
diff changeset
86 bzero (&a, sizeof a);
kono
parents:
diff changeset
87 bzero (&a, sizeof (a));
kono
parents:
diff changeset
88 bzero (&a, sizeof (struct A));
kono
parents:
diff changeset
89 bzero (&a, sizeof (const struct A));
kono
parents:
diff changeset
90 bzero (&a, sizeof (volatile struct A));
kono
parents:
diff changeset
91 bzero (&a, sizeof (volatile const struct A));
kono
parents:
diff changeset
92 bzero (&a, sizeof (TA));
kono
parents:
diff changeset
93 bzero (&a, sizeof (__typeof (*&a)));
kono
parents:
diff changeset
94 bzero (pa1, sizeof (*pa1));
kono
parents:
diff changeset
95 bzero (pa2, sizeof (*pa3));
kono
parents:
diff changeset
96 bzero (pa3, sizeof (__typeof (*pa3)));
kono
parents:
diff changeset
97 /* These are probably broken, but obfuscated, no warning. */
kono
parents:
diff changeset
98 bzero ((void *) &a, sizeof (&a));
kono
parents:
diff changeset
99 bzero ((char *) &a, sizeof (&a));
kono
parents:
diff changeset
100 bzero (&a, sizeof (&a) + 0);
kono
parents:
diff changeset
101 bzero (&a, 0 + sizeof (&a));
kono
parents:
diff changeset
102
kono
parents:
diff changeset
103 /* These are correct, no warning. */
kono
parents:
diff changeset
104 bcopy (x, &a, sizeof a);
kono
parents:
diff changeset
105 bcopy (x, &a, sizeof (a));
kono
parents:
diff changeset
106 bcopy (x, &a, sizeof (struct A));
kono
parents:
diff changeset
107 bcopy (x, &a, sizeof (const struct A));
kono
parents:
diff changeset
108 bcopy (x, &a, sizeof (volatile struct A));
kono
parents:
diff changeset
109 bcopy (x, &a, sizeof (volatile const struct A));
kono
parents:
diff changeset
110 bcopy (x, &a, sizeof (TA));
kono
parents:
diff changeset
111 bcopy (x, &a, sizeof (__typeof (*&a)));
kono
parents:
diff changeset
112 bcopy (x, pa1, sizeof (*pa1));
kono
parents:
diff changeset
113 bcopy (x, pa2, sizeof (*pa3));
kono
parents:
diff changeset
114 bcopy (x, pa3, sizeof (__typeof (*pa3)));
kono
parents:
diff changeset
115 /* These are probably broken, but obfuscated, no warning. */
kono
parents:
diff changeset
116 bcopy (x, (void *) &a, sizeof (&a));
kono
parents:
diff changeset
117 bcopy (x, (char *) &a, sizeof (&a));
kono
parents:
diff changeset
118 bcopy (x, &a, sizeof (&a) + 0);
kono
parents:
diff changeset
119 bcopy (x, &a, 0 + sizeof (&a));
kono
parents:
diff changeset
120
kono
parents:
diff changeset
121 /* These are correct, no warning. */
kono
parents:
diff changeset
122 bcopy (&a, x, sizeof a);
kono
parents:
diff changeset
123 bcopy (&a, x, sizeof (a));
kono
parents:
diff changeset
124 bcopy (&a, x, sizeof (struct A));
kono
parents:
diff changeset
125 bcopy (&a, x, sizeof (const struct A));
kono
parents:
diff changeset
126 bcopy (&a, x, sizeof (volatile struct A));
kono
parents:
diff changeset
127 bcopy (&a, x, sizeof (volatile const struct A));
kono
parents:
diff changeset
128 bcopy (&a, x, sizeof (TA));
kono
parents:
diff changeset
129 bcopy (&a, x, sizeof (__typeof (*&a)));
kono
parents:
diff changeset
130 bcopy (pa1, x, sizeof (*pa1));
kono
parents:
diff changeset
131 bcopy (pa2, x, sizeof (*pa3));
kono
parents:
diff changeset
132 bcopy (pa3, x, sizeof (__typeof (*pa3)));
kono
parents:
diff changeset
133 /* These are probably broken, but obfuscated, no warning. */
kono
parents:
diff changeset
134 bcopy ((void *) &a, x, sizeof (&a));
kono
parents:
diff changeset
135 bcopy ((char *) &a, x, sizeof (&a));
kono
parents:
diff changeset
136 bcopy (&a, x, sizeof (&a) + 0);
kono
parents:
diff changeset
137 bcopy (&a, x, 0 + sizeof (&a));
kono
parents:
diff changeset
138
kono
parents:
diff changeset
139 /* These are correct, no warning. */
kono
parents:
diff changeset
140 z += bcmp (&a, x, sizeof a);
kono
parents:
diff changeset
141 z += bcmp (&a, x, sizeof (a));
kono
parents:
diff changeset
142 z += bcmp (&a, x, sizeof (struct A));
kono
parents:
diff changeset
143 z += bcmp (&a, x, sizeof (const struct A));
kono
parents:
diff changeset
144 z += bcmp (&a, x, sizeof (volatile struct A));
kono
parents:
diff changeset
145 z += bcmp (&a, x, sizeof (volatile const struct A));
kono
parents:
diff changeset
146 z += bcmp (&a, x, sizeof (TA));
kono
parents:
diff changeset
147 z += bcmp (&a, x, sizeof (__typeof (*&a)));
kono
parents:
diff changeset
148 z += bcmp (pa1, x, sizeof (*pa1));
kono
parents:
diff changeset
149 z += bcmp (pa2, x, sizeof (*pa3));
kono
parents:
diff changeset
150 z += bcmp (pa3, x, sizeof (__typeof (*pa3)));
kono
parents:
diff changeset
151 /* These are probably broken, but obfuscated, no warning. */
kono
parents:
diff changeset
152 z += bcmp ((void *) &a, x, sizeof (&a));
kono
parents:
diff changeset
153 z += bcmp ((char *) &a, x, sizeof (&a));
kono
parents:
diff changeset
154 z += bcmp (&a, x, sizeof (&a) + 0);
kono
parents:
diff changeset
155 z += bcmp (&a, x, 0 + sizeof (&a));
kono
parents:
diff changeset
156
kono
parents:
diff changeset
157 /* These are correct, no warning. */
kono
parents:
diff changeset
158 z += bcmp (x, &a, sizeof a);
kono
parents:
diff changeset
159 z += bcmp (x, &a, sizeof (a));
kono
parents:
diff changeset
160 z += bcmp (x, &a, sizeof (struct A));
kono
parents:
diff changeset
161 z += bcmp (x, &a, sizeof (const struct A));
kono
parents:
diff changeset
162 z += bcmp (x, &a, sizeof (volatile struct A));
kono
parents:
diff changeset
163 z += bcmp (x, &a, sizeof (volatile const struct A));
kono
parents:
diff changeset
164 z += bcmp (x, &a, sizeof (TA));
kono
parents:
diff changeset
165 z += bcmp (x, &a, sizeof (__typeof (*&a)));
kono
parents:
diff changeset
166 z += bcmp (x, pa1, sizeof (*pa1));
kono
parents:
diff changeset
167 z += bcmp (x, pa2, sizeof (*pa3));
kono
parents:
diff changeset
168 z += bcmp (x, pa3, sizeof (__typeof (*pa3)));
kono
parents:
diff changeset
169 /* These are probably broken, but obfuscated, no warning. */
kono
parents:
diff changeset
170 z += bcmp (x, (void *) &a, sizeof (&a));
kono
parents:
diff changeset
171 z += bcmp (x, (char *) &a, sizeof (&a));
kono
parents:
diff changeset
172 z += bcmp (x, &a, sizeof (&a) + 0);
kono
parents:
diff changeset
173 z += bcmp (x, &a, 0 + sizeof (&a));
kono
parents:
diff changeset
174
kono
parents:
diff changeset
175 return z;
kono
parents:
diff changeset
176 }
kono
parents:
diff changeset
177
kono
parents:
diff changeset
178 int
kono
parents:
diff changeset
179 f2 (void *x, int z)
kono
parents:
diff changeset
180 {
kono
parents:
diff changeset
181 struct B b, *pb1 = &b;
kono
parents:
diff changeset
182 TB *pb2 = &b;
kono
parents:
diff changeset
183 PB pb3 = &b;
kono
parents:
diff changeset
184 PTB pb4 = &b;
kono
parents:
diff changeset
185 bzero (&b, sizeof (&b)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
kono
parents:
diff changeset
186 bzero (pb1, sizeof (pb1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
187 bzero (pb2, sizeof pb2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
188 bzero (pb3, sizeof (pb3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
189 bzero (pb4, sizeof pb4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
190 bzero (pb1, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
191 bzero (pb2, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
192 bzero (pb3, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
193 bzero (pb4, sizeof (__typeof (pb4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
194
kono
parents:
diff changeset
195 bcopy (x, &b, sizeof (&b)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
kono
parents:
diff changeset
196 bcopy (x, pb1, sizeof (pb1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
197 bcopy (x, pb2, sizeof pb2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
198 bcopy (x, pb3, sizeof (pb3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
199 bcopy (x, pb4, sizeof pb4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
200 bcopy (x, pb1, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
201 bcopy (x, pb2, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
202 bcopy (x, pb3, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
203 bcopy (x, pb4, sizeof (__typeof (pb4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
204
kono
parents:
diff changeset
205 bcopy (&b, x, sizeof (&b)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
kono
parents:
diff changeset
206 bcopy (pb1, x, sizeof (pb1)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
kono
parents:
diff changeset
207 bcopy (pb2, x, sizeof pb2); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
kono
parents:
diff changeset
208 bcopy (pb3, x, sizeof (pb3)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
kono
parents:
diff changeset
209 bcopy (pb4, x, sizeof pb4); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
kono
parents:
diff changeset
210 bcopy (pb1, x, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
211 bcopy (pb2, x, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
212 bcopy (pb3, x, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
213 bcopy (pb4, x, sizeof (__typeof (pb4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
214
kono
parents:
diff changeset
215 z += bcmp (&b, x, sizeof (&b)); /* { dg-warning "call is the same expression as the first source; did you mean to remove the addressof" } */
kono
parents:
diff changeset
216 z += bcmp (pb1, x, sizeof (pb1)); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
kono
parents:
diff changeset
217 z += bcmp (pb2, x, sizeof pb2); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
kono
parents:
diff changeset
218 z += bcmp (pb3, x, sizeof (pb3)); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
kono
parents:
diff changeset
219 z += bcmp (pb4, x, sizeof pb4); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
kono
parents:
diff changeset
220 z += bcmp (pb1, x, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
221 z += bcmp (pb2, x, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
222 z += bcmp (pb3, x, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
223
kono
parents:
diff changeset
224 z += bcmp (x, &b, sizeof (&b)); /* { dg-warning "call is the same expression as the second source; did you mean to remove the addressof" } */
kono
parents:
diff changeset
225 z += bcmp (x, pb1, sizeof (pb1)); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
kono
parents:
diff changeset
226 z += bcmp (x, pb2, sizeof pb2); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
kono
parents:
diff changeset
227 z += bcmp (x, pb3, sizeof (pb3)); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
kono
parents:
diff changeset
228 z += bcmp (x, pb4, sizeof pb4); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
kono
parents:
diff changeset
229 z += bcmp (x, pb1, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
230 z += bcmp (x, pb2, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
231 z += bcmp (x, pb3, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
kono
parents:
diff changeset
232
kono
parents:
diff changeset
233 /* These are correct, no warning. */
kono
parents:
diff changeset
234 bzero (&b, sizeof b);
kono
parents:
diff changeset
235 bzero (&b, sizeof (b));
kono
parents:
diff changeset
236 bzero (&b, sizeof (struct B));
kono
parents:
diff changeset
237 bzero (&b, sizeof (const struct B));
kono
parents:
diff changeset
238 bzero (&b, sizeof (volatile struct B));
kono
parents:
diff changeset
239 bzero (&b, sizeof (volatile const struct B));
kono
parents:
diff changeset
240 bzero (&b, sizeof (TB));
kono
parents:
diff changeset
241 bzero (&b, sizeof (__typeof (*&b)));
kono
parents:
diff changeset
242 bzero (pb1, sizeof (*pb1));
kono
parents:
diff changeset
243 bzero (pb2, sizeof (*pb3));
kono
parents:
diff changeset
244 bzero (pb3, sizeof (__typeof (*pb3)));
kono
parents:
diff changeset
245 /* These are probably broken, but obfuscated, no warning. */
kono
parents:
diff changeset
246 bzero ((void *) &b, sizeof (&b));
kono
parents:
diff changeset
247 bzero ((char *) &b, sizeof (&b));
kono
parents:
diff changeset
248 bzero (&b, sizeof (&b) + 0);
kono
parents:
diff changeset
249 bzero (&b, 0 + sizeof (&b));
kono
parents:
diff changeset
250
kono
parents:
diff changeset
251 /* These are correct, no warning. */
kono
parents:
diff changeset
252 bcopy (x, &b, sizeof b);
kono
parents:
diff changeset
253 bcopy (x, &b, sizeof (b));
kono
parents:
diff changeset
254 bcopy (x, &b, sizeof (struct B));
kono
parents:
diff changeset
255 bcopy (x, &b, sizeof (const struct B));
kono
parents:
diff changeset
256 bcopy (x, &b, sizeof (volatile struct B));
kono
parents:
diff changeset
257 bcopy (x, &b, sizeof (volatile const struct B));
kono
parents:
diff changeset
258 bcopy (x, &b, sizeof (TB));
kono
parents:
diff changeset
259 bcopy (x, &b, sizeof (__typeof (*&b)));
kono
parents:
diff changeset
260 bcopy (x, pb1, sizeof (*pb1));
kono
parents:
diff changeset
261 bcopy (x, pb2, sizeof (*pb3));
kono
parents:
diff changeset
262 bcopy (x, pb3, sizeof (__typeof (*pb3)));
kono
parents:
diff changeset
263 /* These are probably broken, but obfuscated, no warning. */
kono
parents:
diff changeset
264 bcopy (x, (void *) &b, sizeof (&b));
kono
parents:
diff changeset
265 bcopy (x, (char *) &b, sizeof (&b));
kono
parents:
diff changeset
266 bcopy (x, &b, sizeof (&b) + 0);
kono
parents:
diff changeset
267 bcopy (x, &b, 0 + sizeof (&b));
kono
parents:
diff changeset
268
kono
parents:
diff changeset
269 /* These are correct, no warning. */
kono
parents:
diff changeset
270 bcopy (&b, x, sizeof b);
kono
parents:
diff changeset
271 bcopy (&b, x, sizeof (b));
kono
parents:
diff changeset
272 bcopy (&b, x, sizeof (struct B));
kono
parents:
diff changeset
273 bcopy (&b, x, sizeof (const struct B));
kono
parents:
diff changeset
274 bcopy (&b, x, sizeof (volatile struct B));
kono
parents:
diff changeset
275 bcopy (&b, x, sizeof (volatile const struct B));
kono
parents:
diff changeset
276 bcopy (&b, x, sizeof (TB));
kono
parents:
diff changeset
277 bcopy (&b, x, sizeof (__typeof (*&b)));
kono
parents:
diff changeset
278 bcopy (pb1, x, sizeof (*pb1));
kono
parents:
diff changeset
279 bcopy (pb2, x, sizeof (*pb3));
kono
parents:
diff changeset
280 bcopy (pb3, x, sizeof (__typeof (*pb3)));
kono
parents:
diff changeset
281 /* These are probably broken, but obfuscated, no warning. */
kono
parents:
diff changeset
282 bcopy ((void *) &b, x, sizeof (&b));
kono
parents:
diff changeset
283 bcopy ((char *) &b, x, sizeof (&b));
kono
parents:
diff changeset
284 bcopy (&b, x, sizeof (&b) + 0);
kono
parents:
diff changeset
285 bcopy (&b, x, 0 + sizeof (&b));
kono
parents:
diff changeset
286
kono
parents:
diff changeset
287 /* These are correct, no warning. */
kono
parents:
diff changeset
288 z += bcmp (&b, x, sizeof b);
kono
parents:
diff changeset
289 z += bcmp (&b, x, sizeof (b));
kono
parents:
diff changeset
290 z += bcmp (&b, x, sizeof (struct B));
kono
parents:
diff changeset
291 z += bcmp (&b, x, sizeof (const struct B));
kono
parents:
diff changeset
292 z += bcmp (&b, x, sizeof (volatile struct B));
kono
parents:
diff changeset
293 z += bcmp (&b, x, sizeof (volatile const struct B));
kono
parents:
diff changeset
294 z += bcmp (&b, x, sizeof (TB));
kono
parents:
diff changeset
295 z += bcmp (&b, x, sizeof (__typeof (*&b)));
kono
parents:
diff changeset
296 z += bcmp (pb1, x, sizeof (*pb1));
kono
parents:
diff changeset
297 z += bcmp (pb2, x, sizeof (*pb3));
kono
parents:
diff changeset
298 z += bcmp (pb3, x, sizeof (__typeof (*pb3)));
kono
parents:
diff changeset
299 /* These are probably broken, but obfuscated, no warning. */
kono
parents:
diff changeset
300 z += bcmp ((void *) &b, x, sizeof (&b));
kono
parents:
diff changeset
301 z += bcmp ((char *) &b, x, sizeof (&b));
kono
parents:
diff changeset
302 z += bcmp (&b, x, sizeof (&b) + 0);
kono
parents:
diff changeset
303 z += bcmp (&b, x, 0 + sizeof (&b));
kono
parents:
diff changeset
304
kono
parents:
diff changeset
305 /* These are correct, no warning. */
kono
parents:
diff changeset
306 z += bcmp (x, &b, sizeof b);
kono
parents:
diff changeset
307 z += bcmp (x, &b, sizeof (b));
kono
parents:
diff changeset
308 z += bcmp (x, &b, sizeof (struct B));
kono
parents:
diff changeset
309 z += bcmp (x, &b, sizeof (const struct B));
kono
parents:
diff changeset
310 z += bcmp (x, &b, sizeof (volatile struct B));
kono
parents:
diff changeset
311 z += bcmp (x, &b, sizeof (volatile const struct B));
kono
parents:
diff changeset
312 z += bcmp (x, &b, sizeof (TB));
kono
parents:
diff changeset
313 z += bcmp (x, &b, sizeof (__typeof (*&b)));
kono
parents:
diff changeset
314 z += bcmp (x, pb1, sizeof (*pb1));
kono
parents:
diff changeset
315 z += bcmp (x, pb2, sizeof (*pb3));
kono
parents:
diff changeset
316 z += bcmp (x, pb3, sizeof (__typeof (*pb3)));
kono
parents:
diff changeset
317 /* These are probably broken, but obfuscated, no warning. */
kono
parents:
diff changeset
318 z += bcmp (x, (void *) &b, sizeof (&b));
kono
parents:
diff changeset
319 z += bcmp (x, (char *) &b, sizeof (&b));
kono
parents:
diff changeset
320 z += bcmp (x, &b, sizeof (&b) + 0);
kono
parents:
diff changeset
321 z += bcmp (x, &b, 0 + sizeof (&b));
kono
parents:
diff changeset
322
kono
parents:
diff changeset
323 return z;
kono
parents:
diff changeset
324 }
kono
parents:
diff changeset
325
kono
parents:
diff changeset
326 int
kono
parents:
diff changeset
327 f3 (void *x, char *y, int z, X w)
kono
parents:
diff changeset
328 {
kono
parents:
diff changeset
329 unsigned char *y1 = (unsigned char *) __builtin_alloca (z + 16);
kono
parents:
diff changeset
330 char buf1[7];
kono
parents:
diff changeset
331 signed char buf2[z + 32];
kono
parents:
diff changeset
332 long buf3[17];
kono
parents:
diff changeset
333 int *buf4[9];
kono
parents:
diff changeset
334 signed char *y2 = buf2;
kono
parents:
diff changeset
335 char c;
kono
parents:
diff changeset
336 char *y3;
kono
parents:
diff changeset
337 bzero (y, sizeof (y)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
kono
parents:
diff changeset
338 bzero (y1, sizeof (y1)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
kono
parents:
diff changeset
339 bzero (y2, sizeof (y2)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
kono
parents:
diff changeset
340 bzero (&c, sizeof (&c)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
kono
parents:
diff changeset
341 bzero (w, sizeof w); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
342
kono
parents:
diff changeset
343 bcopy (x, y, sizeof (y)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
kono
parents:
diff changeset
344 bcopy (x, y1, sizeof (y1)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
kono
parents:
diff changeset
345 bcopy (x, y2, sizeof (y2)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
kono
parents:
diff changeset
346 bcopy (x, &c, sizeof (&c)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
kono
parents:
diff changeset
347 bcopy (x, w, sizeof w); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
kono
parents:
diff changeset
348
kono
parents:
diff changeset
349 bcopy (y, x, sizeof (y)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
kono
parents:
diff changeset
350 bcopy (y1, x, sizeof (y1)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
kono
parents:
diff changeset
351 bcopy (y2, x, sizeof (y2)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
kono
parents:
diff changeset
352 bcopy (&c, x, sizeof (&c)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
kono
parents:
diff changeset
353 bcopy (w, x, sizeof w); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
kono
parents:
diff changeset
354
kono
parents:
diff changeset
355 z += bcmp (y, x, sizeof (y)); /* { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" } */
kono
parents:
diff changeset
356 z += bcmp (y1, x, sizeof (y1)); /* { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" } */
kono
parents:
diff changeset
357 z += bcmp (y2, x, sizeof (y2)); /* { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" } */
kono
parents:
diff changeset
358 z += bcmp (&c, x, sizeof (&c)); /* { dg-warning "call is the same expression as the first source; did you mean to remove the addressof" } */
kono
parents:
diff changeset
359 z += bcmp (w, x, sizeof w); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
kono
parents:
diff changeset
360
kono
parents:
diff changeset
361 z += bcmp (x, y, sizeof (y)); /* { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" } */
kono
parents:
diff changeset
362 z += bcmp (x, y1, sizeof (y1)); /* { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" } */
kono
parents:
diff changeset
363 z += bcmp (x, y2, sizeof (y2)); /* { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" } */
kono
parents:
diff changeset
364 z += bcmp (x, &c, sizeof (&c)); /* { dg-warning "call is the same expression as the second source; did you mean to remove the addressof" } */
kono
parents:
diff changeset
365 z += bcmp (x, w, sizeof w); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
kono
parents:
diff changeset
366
kono
parents:
diff changeset
367 /* These are correct, no warning. */
kono
parents:
diff changeset
368 bzero (y, sizeof (*y));
kono
parents:
diff changeset
369 bzero (y1, sizeof (*y2));
kono
parents:
diff changeset
370 bzero (buf1, sizeof buf1);
kono
parents:
diff changeset
371 bzero (buf3, sizeof (buf3));
kono
parents:
diff changeset
372 bzero (&buf3[0], sizeof (buf3));
kono
parents:
diff changeset
373 bzero (&buf4[0], sizeof (buf4));
kono
parents:
diff changeset
374 bzero (w, sizeof (X));
kono
parents:
diff changeset
375 /* These are probably broken, but obfuscated, no warning. */
kono
parents:
diff changeset
376 bzero ((void *) y, sizeof (y));
kono
parents:
diff changeset
377 bzero ((char *) y1, sizeof (y2));
kono
parents:
diff changeset
378 bzero (y, sizeof (y) + 0);
kono
parents:
diff changeset
379 bzero (y1, 0 + sizeof (y2));
kono
parents:
diff changeset
380 bzero ((void *) &c, sizeof (&c));
kono
parents:
diff changeset
381 bzero ((signed char *) &c, sizeof (&c));
kono
parents:
diff changeset
382 bzero (&c, sizeof (&c) + 0);
kono
parents:
diff changeset
383 bzero (&c, 0 + sizeof (&c));
kono
parents:
diff changeset
384
kono
parents:
diff changeset
385 /* These are correct, no warning. */
kono
parents:
diff changeset
386 bcopy (x, y, sizeof (*y));
kono
parents:
diff changeset
387 bcopy (x, y1, sizeof (*y2));
kono
parents:
diff changeset
388 bcopy (x, buf1, sizeof buf1);
kono
parents:
diff changeset
389 bcopy (x, buf3, sizeof (buf3));
kono
parents:
diff changeset
390 bcopy (x, &buf3[0], sizeof (buf3));
kono
parents:
diff changeset
391 bcopy (x, &buf4[0], sizeof (buf4));
kono
parents:
diff changeset
392 bcopy (y, &y3, sizeof (y3));
kono
parents:
diff changeset
393 bcopy (y, (char *) &y3, sizeof (y3));
kono
parents:
diff changeset
394 bcopy (x, w, sizeof (X));
kono
parents:
diff changeset
395 /* These are probably broken, but obfuscated, no warning. */
kono
parents:
diff changeset
396 bcopy (x, (void *) y, sizeof (y));
kono
parents:
diff changeset
397 bcopy (x, (char *) y1, sizeof (y2));
kono
parents:
diff changeset
398 bcopy (x, y, sizeof (y) + 0);
kono
parents:
diff changeset
399 bcopy (x, y1, 0 + sizeof (y2));
kono
parents:
diff changeset
400 bcopy (x, (void *) &c, sizeof (&c));
kono
parents:
diff changeset
401 bcopy (x, (signed char *) &c, sizeof (&c));
kono
parents:
diff changeset
402 bcopy (x, &c, sizeof (&c) + 0);
kono
parents:
diff changeset
403 bcopy (x, &c, 0 + sizeof (&c));
kono
parents:
diff changeset
404
kono
parents:
diff changeset
405 /* These are correct, no warning. */
kono
parents:
diff changeset
406 bcopy (y, x, sizeof (*y));
kono
parents:
diff changeset
407 bcopy (y1, x, sizeof (*y2));
kono
parents:
diff changeset
408 bcopy (buf1, x, sizeof buf1);
kono
parents:
diff changeset
409 bcopy (buf3, x, sizeof (buf3));
kono
parents:
diff changeset
410 bcopy (&buf3[0], x, sizeof (buf3));
kono
parents:
diff changeset
411 bcopy (&buf4[0], x, sizeof (buf4));
kono
parents:
diff changeset
412 bcopy (&y3, y, sizeof (y3));
kono
parents:
diff changeset
413 bcopy ((char *) &y3, y, sizeof (y3));
kono
parents:
diff changeset
414 bcopy (w, x, sizeof (X));
kono
parents:
diff changeset
415 /* These are probably broken, but obfuscated, no warning. */
kono
parents:
diff changeset
416 bcopy ((void *) y, x, sizeof (y));
kono
parents:
diff changeset
417 bcopy ((char *) y1, x, sizeof (y2));
kono
parents:
diff changeset
418 bcopy (y, x, sizeof (y) + 0);
kono
parents:
diff changeset
419 bcopy (y1, x, 0 + sizeof (y2));
kono
parents:
diff changeset
420 bcopy ((void *) &c, x, sizeof (&c));
kono
parents:
diff changeset
421 bcopy ((signed char *) &c, x, sizeof (&c));
kono
parents:
diff changeset
422 bcopy (&c, x, sizeof (&c) + 0);
kono
parents:
diff changeset
423 bcopy (&c, x, 0 + sizeof (&c));
kono
parents:
diff changeset
424
kono
parents:
diff changeset
425 /* These are correct, no warning. */
kono
parents:
diff changeset
426 z += bcmp (y, x, sizeof (*y));
kono
parents:
diff changeset
427 z += bcmp (y1, x, sizeof (*y2));
kono
parents:
diff changeset
428 z += bcmp (buf1, x, sizeof buf1);
kono
parents:
diff changeset
429 z += bcmp (buf3, x, sizeof (buf3));
kono
parents:
diff changeset
430 z += bcmp (&buf3[0], x, sizeof (buf3));
kono
parents:
diff changeset
431 z += bcmp (&buf4[0], x, sizeof (buf4));
kono
parents:
diff changeset
432 z += bcmp (&y3, y, sizeof (y3));
kono
parents:
diff changeset
433 z += bcmp ((char *) &y3, y, sizeof (y3));
kono
parents:
diff changeset
434 z += bcmp (w, x, sizeof (X));
kono
parents:
diff changeset
435 /* These are probably broken, but obfuscated, no warning. */
kono
parents:
diff changeset
436 z += bcmp ((void *) y, x, sizeof (y));
kono
parents:
diff changeset
437 z += bcmp ((char *) y1, x, sizeof (y2));
kono
parents:
diff changeset
438 z += bcmp (y, x, sizeof (y) + 0);
kono
parents:
diff changeset
439 z += bcmp (y1, x, 0 + sizeof (y2));
kono
parents:
diff changeset
440 z += bcmp ((void *) &c, x, sizeof (&c));
kono
parents:
diff changeset
441 z += bcmp ((signed char *) &c, x, sizeof (&c));
kono
parents:
diff changeset
442 z += bcmp (&c, x, sizeof (&c) + 0);
kono
parents:
diff changeset
443 z += bcmp (&c, x, 0 + sizeof (&c));
kono
parents:
diff changeset
444
kono
parents:
diff changeset
445 /* These are correct, no warning. */
kono
parents:
diff changeset
446 z += bcmp (x, y, sizeof (*y));
kono
parents:
diff changeset
447 z += bcmp (x, y1, sizeof (*y2));
kono
parents:
diff changeset
448 z += bcmp (x, buf1, sizeof buf1);
kono
parents:
diff changeset
449 z += bcmp (x, buf3, sizeof (buf3));
kono
parents:
diff changeset
450 z += bcmp (x, &buf3[0], sizeof (buf3));
kono
parents:
diff changeset
451 z += bcmp (x, &buf4[0], sizeof (buf4));
kono
parents:
diff changeset
452 z += bcmp (y, &y3, sizeof (y3));
kono
parents:
diff changeset
453 z += bcmp (y, (char *) &y3, sizeof (y3));
kono
parents:
diff changeset
454 z += bcmp (x, w, sizeof (X));
kono
parents:
diff changeset
455 /* These are probably broken, but obfuscated, no warning. */
kono
parents:
diff changeset
456 z += bcmp (x, (void *) y, sizeof (y));
kono
parents:
diff changeset
457 z += bcmp (x, (char *) y1, sizeof (y2));
kono
parents:
diff changeset
458 z += bcmp (x, y, sizeof (y) + 0);
kono
parents:
diff changeset
459 z += bcmp (x, y1, 0 + sizeof (y2));
kono
parents:
diff changeset
460 z += bcmp (x, (void *) &c, sizeof (&c));
kono
parents:
diff changeset
461 z += bcmp (x, (signed char *) &c, sizeof (&c));
kono
parents:
diff changeset
462 z += bcmp (x, &c, sizeof (&c) + 0);
kono
parents:
diff changeset
463 z += bcmp (x, &c, 0 + sizeof (&c));
kono
parents:
diff changeset
464
kono
parents:
diff changeset
465 return z;
kono
parents:
diff changeset
466 }