------- Comment #6 from jakub at gcc dot gnu dot org 2008-12-18 09:39 ------- 4297 if (init == NULL_TREE) 4298 { 4299 if ((DECL_LANG_SPECIFIC (decl) == 0 4300 || DECL_IN_AGGR_P (decl) == 0) 4301 && ! DECL_THIS_EXTERN (decl)) 4302 error ("%qD declared as reference but not initialized", decl); 4303 return NULL_TREE; 4304 }
DECL_THIS_EXTERN is sticky, if something has been ever declared with extern, it is preserved through duplicate_decls. I wonder why this doesn't use && ! DECL_EXTERNAL (decl) instead. -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38517