Date: Fri, 22 Dec 2023 20:42:56 -0500
On Fri, Dec 22, 2023, 18:46 Steve Downey <sdowney_at_[hidden]> wrote:
> A -Wnone on what translation unit?
>
When translating the module source that is from "the system".
Example at hand is where `std::optional<int16_t> c{300000};` is warnings
> clean because the template is in the system header file. Now, this is a
> case where it probably really ought to warn, but doesn't.
>
I would expect an instantiation that happens because of the local code to
warn, yes.
If compilers don't warn on that today I'd consider it a bug.
But it's also a case where previously clean code is going to fail, but
> there are probably cases where the warning is triggered by something the
> client can't control.
>
Right, a warning created by an instantiation in the module source for a
"foreign" module probably shouldn't warn.
Daniel
>
> A -Wnone on what translation unit?
>
When translating the module source that is from "the system".
Example at hand is where `std::optional<int16_t> c{300000};` is warnings
> clean because the template is in the system header file. Now, this is a
> case where it probably really ought to warn, but doesn't.
>
I would expect an instantiation that happens because of the local code to
warn, yes.
If compilers don't warn on that today I'd consider it a bug.
But it's also a case where previously clean code is going to fail, but
> there are probably cases where the warning is triggered by something the
> client can't control.
>
Right, a warning created by an instantiation in the module source for a
"foreign" module probably shouldn't warn.
Daniel
>
Received on 2023-12-23 01:43:09