https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66508
--- Comment #3 from Fan You <youfan.noey at gmail dot com> --- (In reply to Dominique d'Humieres from comment #2) > Duplicate of pr66448? Which revision are you using? Just updated and tried again, get the same result. Revision: 224410 After changing diff --git a/gcc/passes.c b/gcc/passes.c index d3ffe33..1bc8a36 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -332,7 +332,7 @@ rest_of_decl_compilation (tree decl, */ && !decl_function_context (decl) && !current_function_decl - + && DECL_SOURCE_LOCATION (decl) != BUILTINS_LOCATION && !decl_type_context (decl)) (*debug_hooks->early_global_decl) (decl); } I get similar error as pr66448 /Users/jieyuandai/src/gcc/gcc/dwarf2out.c:5693:1: error: ‘void check_die(dw_die_ref)’ defined but not used [-Werror=unused-function] check_die (dw_die_ref die) ^ cc1plus: all warnings being treated as errors Retry build with gcc-4.9.2 get the same results.