Commit 5eb083b
committed
rules-qt: warn() walks the message by index, because gcc 16 refuses to inline the iterator here
The range-for walked a `std::string` through `__gnu_cxx::__normal_iterator`, whose
`operator*` and `operator++` are `always_inline` and reach this module from the
`std` module. Once this file imported one module more, gcc 16.1.0 refused both:
error: inlining failed in call to 'always_inline'
'constexpr __gnu_cxx::__normal_iterator<...>::operator*() const'
note: called from here for (char c : message)
in `warn@mcpp.rules.qt` alone, while every other range-for in the collection
compiled. Measured on this machine with `MCPP_TOOLCHAIN=gcc@16.1.0`: two errors
before, none after, and the qt consumer builds. An index touches no iterator, so
it does not depend on what a BMI carries across a module boundary -- the same
hazard class the engine records for a clang 20.1.7 crash, where the error names a
file the change never touched.1 parent 141f416 commit 5eb083b
1 file changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
132 | 146 | | |
133 | 147 | | |
134 | 148 | | |
135 | 149 | | |
136 | | - | |
| 150 | + | |
| 151 | + | |
137 | 152 | | |
138 | 153 | | |
139 | 154 | | |
| |||
0 commit comments