Bug ID: 86483
           Summary: alloc_size attribute does not work on functions
                    returning a struct that contains the pointer
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot
          Reporter: gonzalobg88 at gmail dot com
  Target Milestone: ---

I am trying to implementing P0901r0 [0] in jemalloc. The signature of the new
memory allocation function looks like this: 

typedef struct {
        void *ptr;
        size_t usize;
} smallocx_return_t;
smallocx_return_t je_smallocx(size_t size, int flags); 

I have to set the alloc_size attribute for smallocx_return_t.ptr, but AFAICT
this is not currently possible. 


Reply via email to