public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/111025] New: attribute((malloc)) and posix_memalign() (and other functions that return newly allocated object address into an output parameter)
@ 2023-08-15 9:47 yann at droneaud dot fr
2023-08-15 13:49 ` [Bug c/111025] " rguenth at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: yann at droneaud dot fr @ 2023-08-15 9:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111025
Bug ID: 111025
Summary: attribute((malloc)) and posix_memalign() (and other
functions that return newly allocated object address
into an output parameter)
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: yann at droneaud dot fr
Target Milestone: ---
Functions such as posix_memalign() don't return the pointer to the newly
allocated memory as their return value, thus attribute((malloc)) cannot be used
with them.
It would be useful to have some form of attribute((malloc)) that could apply to
function such as posix_memalign().
This new attribute((malloc)) form could also be used on asprintf() for example.
With support for the attribute((malloc))'s deallocator specification, it could
improve warnings at compile time and prevents developer mistake.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/111025] attribute((malloc)) and posix_memalign() (and other functions that return newly allocated object address into an output parameter)
2023-08-15 9:47 [Bug c/111025] New: attribute((malloc)) and posix_memalign() (and other functions that return newly allocated object address into an output parameter) yann at droneaud dot fr
@ 2023-08-15 13:49 ` rguenth at gcc dot gnu.org
2023-08-15 13:50 ` rguenth at gcc dot gnu.org
2023-08-15 16:03 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-08-15 13:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111025
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-08-15
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. We probably have a duplicate bugreport.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/111025] attribute((malloc)) and posix_memalign() (and other functions that return newly allocated object address into an output parameter)
2023-08-15 9:47 [Bug c/111025] New: attribute((malloc)) and posix_memalign() (and other functions that return newly allocated object address into an output parameter) yann at droneaud dot fr
2023-08-15 13:49 ` [Bug c/111025] " rguenth at gcc dot gnu.org
@ 2023-08-15 13:50 ` rguenth at gcc dot gnu.org
2023-08-15 16:03 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-08-15 13:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111025
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Note GCC already handles this internally (posix_memalign, that is) as if a
malloc attribute was possible and present.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/111025] attribute((malloc)) and posix_memalign() (and other functions that return newly allocated object address into an output parameter)
2023-08-15 9:47 [Bug c/111025] New: attribute((malloc)) and posix_memalign() (and other functions that return newly allocated object address into an output parameter) yann at droneaud dot fr
2023-08-15 13:49 ` [Bug c/111025] " rguenth at gcc dot gnu.org
2023-08-15 13:50 ` rguenth at gcc dot gnu.org
@ 2023-08-15 16:03 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-15 16:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111025
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=60086
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
It was referenced in pr 60086
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-15 16:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-15 9:47 [Bug c/111025] New: attribute((malloc)) and posix_memalign() (and other functions that return newly allocated object address into an output parameter) yann at droneaud dot fr
2023-08-15 13:49 ` [Bug c/111025] " rguenth at gcc dot gnu.org
2023-08-15 13:50 ` rguenth at gcc dot gnu.org
2023-08-15 16:03 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).