--- Comment #3 from lisp2d at lisp2d dot net 2008-12-16 05:52 ---
More exact example:
.h:
extern int& i;
.cpp:
int& i; // ok
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38517
--- Comment #2 from pinskia at gcc dot gnu dot org 2008-12-16 00:12 ---
extern int &i;
is valid though. Note in C, int i; is a tentative definition while in C++,
there is no such thing as a tentative definition so it is normal definition and
therefor since it is a reference type variabl
--- Comment #1 from pinskia at gcc dot gnu dot org 2008-12-16 00:11 ---
t.c:1: error: 'i' declared as reference but not initialized
Why do you think this is valid code? Reference variables have to be
initialized.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38517