https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105595

--- Comment #5 from dennis-hezel at gmx dot de ---
> naturally, if you never include this file twice, it should be okay

That is exactly the point. Whenever a file with your `namespace { struct X {};
}` example or the coroutine example is included into another file we get this
warning. It is correct that we may only include the file into exactly one TU.
But we get the warning even if we uphold that which is what I would like to see
fixed.

Here is a more realistic example program also featuring a similar, regular
function for comparison. Note how the function does not trigger the warning.

https://godbolt.org/z/56bTsMsee

Reply via email to