The enhancement to detect mismatched attributes between function aliases and their targets triggers (expected) warnings in GCC builds due to aliases being declared with fewer attributes than their targets. Using attribute copy as recommended to copy the attributes from the target to the alias triggers another warning, this time due to applying attribute leaf to static functions (the attribute only applies to extern functions). This is due to an oversight in both the handler for attribute copy and in the -Wmissing-attributes warning. In addition, the copy attribute handler doesn't account for C11 _Noreturn and C++ throw() specifications, both of which set the corresponding tree bits but don't attach the synonymous attribute to it. This also leads to warnings in GCC builds (in libgfortran). The attached patch corrects all of these problems: the attribute copy handler to avoid copying attribute leaf to declarations of static functions, and to set the noreturn and nonthrow bits, and the missing attribute warning to avoid triggering for static weakref aliases whose targets are decorated wiwth attribute leaf. With this patch, GCC should build with no -Wmissing-attributes warnings. Tested on x86_64-linux. Martin