https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78979
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- The Solaris header would be more correct if it did: #if __STDC_VERSION__ < 201112L && __cplusplus < 201402L extern char *gets(char *) __ATTR_DEPRECATED; #endif That would suppress the declaration for C++14, as the C++14 standard requires. You could use fixincludes to do that. I'm not sure how important it is, or if we should just XFAIL the test.