You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tree:
259d873b41
3.0.x
cherry-pick-c5513cf9
master
mmdevice-clean/8
update/opus-1.6.1
work/string-cache
work/unnecessary-disc-string
0.1.99e
0.2.70
0.2.72
0.2.73
0.2.81
0.2.83
0.2.91
0.2.92
0.3.0
0.3.1
0.4.0
0.4.1
0.4.2
0.4.3
0.4.4
0.4.5
0.4.6
0.4.6.1
0.5.0
0.5.1
0.5.2
0.5.3
0.6.0
0.6.1
0.6.2
0.7.0
0.7.1
0.7.2
0.8.0
0.8.1
0.8.2
0.8.4
0.9.0
0.9.0-test0
0.9.0-test1
0.9.0-test2
0.9.0-test3
1.0.0-pre1
1.0.0-pre2
1.0.0-rc1
1.1.0-ff
1.1.0-pre1
1.2.0-pre1
1.3.0-git
2.1.0-git
2.2.0-git
3.0.0
3.0.0-1
3.0.0-2
3.0.0-git
3.0.0-rc1
3.0.0-rc2
3.0.0-rc3
3.0.0-rc4
3.0.0-rc5
3.0.0-rc6
3.0.0-rc7
3.0.0-rc8
3.0.0.1
3.0.1
3.0.10
3.0.11
3.0.11.1
3.0.12
3.0.12-1
3.0.12.1
3.0.13
3.0.14
3.0.15
3.0.16
3.0.17
3.0.17-1
3.0.17.2
3.0.17.3
3.0.17.4
3.0.18
3.0.18-rc
3.0.18-rc2
3.0.19
3.0.2
3.0.20
3.0.21
3.0.21-1
3.0.22
3.0.22-rc1
3.0.22-rc2
3.0.23
3.0.23-1
3.0.23-2
3.0.23-test-that-will-be-deleted
3.0.3
3.0.3-1
3.0.4
3.0.5
3.0.5-1
3.0.5-2
3.0.6
3.0.7
3.0.7.1
3.0.7.1-1
3.0.8
3.0.9
3.0.9.1
3.0.9.2
4.0-dev
4.0.0-dev
PA_sk2_2023-0110-195255
PA_sk2_2023-0117-124820
PA_sk2_2023-0322-151238
PA_sk2_2023-0405-102335
PA_sk_master_2021-0701-100025
PA_sk_master_2021-0720-100641
PA_sk_master_2021-0816-183339
PA_sk_master_2021-0906-105147
PA_sk_master_2021-1005-082401
PA_sk_master_2021-1027-100227
PA_sk_master_2021-1102-124600
PA_sk_master_2021-1102-162639
PA_sk_master_2021-1109-022737
PA_sk_master_2022-0303-033453
PA_sk_master_2022-0509-173936
PA_sk_master_2022-0509-191127
PA_sk_master_2022-0510-220720
PA_sk_master_2022-1004-191815
PA_sk_master_2022-1209-200142
PA_vlc_master_2021-0616-164351
audiblegenius-2022-08-12-01
audiblegenius-2022-08-12-02
audiblegenius-2022-08-16-01
audiblegenius-2022-08-16-02
demo-ces2019-vlc-vr
svn-trunk
${ noResults }
The json_array_foreach_ref macro declares an anonymous struct type
inside a for-loop initializer:
for (struct { size_t i; const struct json_array *a; } idx = ...
C11 6.8.5p3 constrains the for-loop initializer to only declare
objects with auto or register storage class — in other words, it is
only meant to create loop variables, not to define new types. However,
writing `struct { ... } x = ...;` does two things at once: it defines
a new type (the anonymous struct) and declares a variable.
In C11 standard 6.2.1, struct tags declared inside a for-loop
initializer get block scope of the enclosing block, so the type
definition escapes the for-loop, violating the "only objects"
constraint.
Extract the anonymous struct into a named struct json_array_iter
defined before the macro, so the for-loop initializer only declares a
plain object of an already-existing type.
Clang on armv7 iOS (via xcode-cross) enforces this constraint strictly
and rejects the original code with "declaration of non-local variable in
'for' loop".
|
2 months ago | |
|---|---|---|
| .. | ||
| json | preparser_serializer: json: fix anonymous struct in for-loop initializer | 2 months ago |
| Makefile.am | preparser: add a JSON serialization module | 3 months ago |
| meson.build | preparser: use the same serializer plugin name between meson and autotools | 2 months ago |