https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122705
--- Comment #7 from Alejandro Colomar <[email protected]> --- (In reply to Andrew Pinski from comment #4) > (In reply to Alejandro Colomar from comment #1) > > For consistency with the ones I proposed here, it could be called > > [[gnu::returns_unique_ptr]]. > > malloc has more effects than returns_unique_ptr though so that is NOT a good > name. Hmmm, I see, it also implies that the memory is clean, and so it can't point to anything valid. How about [[gnu::returns_restrict_ptr()]], where restrict means that it doesn't alias anything known, even through dereferencing?
