Commit 6ba5f7e
* zend_portability: Add `ZEND_ATTRIBUTE_NODISCARD`
* zend_ast: Mark `zend_ast_list_add()` as `ZEND_ATTRIBUTE_NODISCARD`
This actually caught a bug in the implementation of attributes on regular
constants: A list of 4 constants with an attribute did not correctly result in
an error, since the reallocated list wasn't stored anywhere.
* zend_portability: Support C++ for `ZEND_ATTRIBUTE_NODISCARD`
Co-authored-by: David CARLIER <[email protected]>
---------
Co-authored-by: David CARLIER <[email protected]>
1 parent 34a0bcf commit 6ba5f7e
File tree
5 files changed
+15
-5
lines changed- Zend
- tests/attributes/constants
5 files changed
+15
-5
lines changedLines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
| 501 | + | |
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
| |||
2956 | 2956 | | |
2957 | 2957 | | |
2958 | 2958 | | |
2959 | | - | |
| 2959 | + | |
2960 | 2960 | | |
2961 | 2961 | | |
2962 | 2962 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
| 323 | + | |
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4391 | 4391 | | |
4392 | 4392 | | |
4393 | 4393 | | |
4394 | | - | |
| 4394 | + | |
4395 | 4395 | | |
4396 | 4396 | | |
4397 | 4397 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
251 | 259 | | |
252 | 260 | | |
253 | 261 | | |
| |||
0 commit comments