[Bug c++/77892] local function declarations don't match namespace scope declarations
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Oct 7 12:15:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77892
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-10-07
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Without line-wrapping:
struct S{friend void f(){}};
void f();
int main()
{
void f();
f();
}
/tmp/cchVsieq.o: In function `main':
/tmp/f.cc:8: undefined reference to `f()'
collect2: error: ld returned 1 exit status
The local redeclaration prevents the inline definition being emitted.
More information about the Gcc-bugs
mailing list