MaskRay wrote:

I haven't looked closely, but the patch made constructor with priority 0~100 an 
error?
```
error: 'destructor' attribute requires integer constant between 101 and 65535 
inclusive
```

I think we should just use a warning to discourage user programs to use 0~100. 
Compiler runtime libraries and their tests can freely use 0~100. They know what 
they are doing and they are responsible for the interaction with other 
constructor users.

```
% gcc -c a.c
a.c:2:1: warning: destructor priorities from 0 to 100 are reserved for the 
implementation [-Wprio-ctor-dtor]
    2 | int f(void) {
      | ^~~
```

https://github.com/llvm/llvm-project/pull/67360
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to