C++ Logo

sg15

Advanced search

Re: "external" modules and warnings

From: Steve Downey <sdowney_at_[hidden]>
Date: Fri, 22 Dec 2023 18:45:54 -0500
A -Wnone on what translation unit?

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. 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.



On Fri, Dec 22, 2023 at 12:34 PM Daniel Ruoso <daniel_at_[hidden]> wrote:

> On Fri, Dec 22, 2023, 12:13 Steve Downey via SG15 <sg15_at_[hidden]>
> wrote:
>
>> If module interfaces are built as part of a project do we need mechanisms
>> to suppress warnings?
>>
>
> I suspect the build system will have to know that this is a "foreign"
> module source being translated and shut up the compiler about warnings.
>
> Maybe we need a -Wnone?
>
> Daniel
>

Received on 2023-12-22 23:46:07