On Mon, 12 Feb 2018, Martin Sebor wrote:

> >> Removing noreturn from the whitelist means having to prevent
> >> the attribute from causing conflicts with the attributes on
> >> the blacklist.  E.g., in this:
> >>
> >>   template <class T> [[malloc]] void* allocate (int);
> >>
> >>   template <> [[noreturn]] void* allocate<void> (int);

Marking a function having a return type as noreturn doesn't make sense.  
So a warning in this case is actually a good thing.  And changing the 
return type to void (so that noreturn makes sense) makes it not a 
specialization anymore (or alternatively if the primary is also changed to 
void then malloc doesn't make sense anymore).


Reply via email to