Commit afe627e
authored
Avoid a -Warray-bounds false positive in GCC 13. (yhirose#1639)
The exact circumstances when this false positive is triggered are quite
tricky to reproduce, but it happened reproducibly with g++ 13.1 and 13.2 in
a close-source SW I'm working on. The fix even improves performance by a
very tiny bit: There is no need to copy the std::smatch, having a const
reference is enough.
Just as a side note: -Warray-bounds seems to cause trouble in other
projects, too, so e.g. the Linux kernel has disabled since June 2022.1 parent 67f6ff7 commit afe627e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4986 | 4986 | | |
4987 | 4987 | | |
4988 | 4988 | | |
4989 | | - | |
| 4989 | + | |
4990 | 4990 | | |
4991 | 4991 | | |
4992 | 4992 | | |
| |||
0 commit comments