| Issue |
173168
|
| Summary |
-w does not allow to ignore -Wincompatible-pointer-types in clang 22
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
azat
|
### Test
```
$ cat /tmp/test.c
#include <stdatomic.h>
typedef struct {
unsigned long *max_allowed_packet;
} MYSQL_PARAMETERS;
static atomic_ulong max_allowed_packet = 1024;
static MYSQL_PARAMETERS mariadb_internal_parameters = {
&max_allowed_packet
};
```
### clang 21
```
$ /usr/bin/clang --version
clang version 21.1.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
$ /usr/bin/clang -std=gnu11 -Werror -w -c -o /dev/null /tmp/test.c && echo OK
OK
```
### clang 22
```
$ git oneline -1 origin/main
3e2a8e2effd1 (origin/main, origin/HEAD) [libc++][multiset] Applied `[[nodiscard]]` (#171654)
$ clang -std=gnu11 -Werror -w -c -o /dev/null /tmp/test.c && echo OK
/tmp/test.c:10:5: error: incompatible pointer types initializing 'unsigned long *' with an _expression_ of type 'atomic_ulong *' (aka '_Atomic(unsigned long) *') [-Wincompatible-pointer-types]
10 | &max_allowed_packet
| ^~~~~~~~~~~~~~~~~~~
1 error generated.
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs