* Pedro Alves:
> For example, for the type above, we'd have:
>
> typedef std::unique_ptr pending_diagnostic_up;
>
> and then:
>
> -pending_diagnostic *d,
> +pending_diagnostic_up d,
>
> I would suggest GCC have a similar guideline
On Tue, 12 Jul 2022 at 11:22, Florian Weimer via Gcc wrote:
>
> * Pedro Alves:
>
> > For example, for the type above, we'd have:
> >
> > typedef std::unique_ptr pending_diagnostic_up;
> >
> > and then:
> >
> > -pending_diagnostic *d,
> > +
On 2022-07-12 11:21 a.m., Florian Weimer wrote:
> * Pedro Alves:
>
>> For example, for the type above, we'd have:
>>
>> typedef std::unique_ptr pending_diagnostic_up;
>>
>> and then:
>>
>> - pending_diagnostic *d,
>> + pending_diagnos
On 2022-07-12 11:45 a.m., Jonathan Wakely wrote:
> On Tue, 12 Jul 2022 at 11:22, Florian Weimer via Gcc wrote:
>>
>> * Pedro Alves:
>>
>>> For example, for the type above, we'd have:
>>>
>>> typedef std::unique_ptr pending_diagnostic_up;
>>>
>>> and then:
>>>
>>> -
---
gcc/analyzer/sm-fd.cc| 231 ---
gcc/c-family/c-attribs.cc| 63
gcc/testsuite/gcc.dg/analyzer/fd-5.c | 44 +
gcc/testsuite/gcc.dg/analyzer/fd-6.c | 4 +
4 files changed, 322 insertions(+), 20 deletions(-)
create mode 100644 g
Hi everyone,
This is an in-progress patch for adding three new function attributes to
GCC for static analysis of file descriptor APIs (which is a part of my GSoC
project)
1) __attribute__((accesses_fd(N)))
This attribute expected argument N of a function to be an open file
descriptor. (see test_
On Tue, 2022-07-12 at 23:03 +0530, Mir Immad wrote:
[cross-posting to the glibc development mailing list; updating subject
accordingly]
> Hi everyone,
Hi Immad, GCC developers, and glibc developers.
glibc developers: Immad is a GSoC student, he's been adding checks for
file-descriptor-based API
On Tue, 2022-07-12 at 18:16 -0400, David Malcolm wrote:
> On Tue, 2022-07-12 at 23:03 +0530, Mir Immad wrote:
>
> [cross-posting to the glibc development mailing list; updating subject
> accordingly]
>
> > Hi everyone,
>
> Hi Immad, GCC developers, and glibc developers.
>
> glibc developers: Im