[PATCH] add support for -Wmismatched-dealloc

Joseph Myers joseph@codesourcery.com
Wed Dec 9 00:07:24 GMT 2020


I don't see any definition of __attr_dealloc (presumably should be a macro 
in misc/sys/cdefs.h) in this patch (or in the glibc source tree).

Given all the functions in stdio.h with the same list of deallocation 
functions, there should probably be another macro there to expand to 
__attribute_malloc__ __attr_dealloc (fclose, 1) __attr_dealloc (freopen, 
3) __attr_dealloc_freopen64.  (That would also apply to open_wmemstream in 
wchar.h, but I suppose you have the issue there with functions not being 
declared in wchar.h, only in stdio.h?)

-- 
Joseph S. Myers
joseph@codesourcery.com


More information about the Libc-alpha mailing list