This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: C++ compile -vs- errors in structure definition
- To: tromey at cygnus dot com
- Subject: Re: C++ compile -vs- errors in structure definition
- From: Gabriel Dos Reis <Gabriel dot Dos-Reis at cmla dot ens-cachan dot fr>
- Date: 20 Jan 2000 18:04:24 +0100
- Cc: Gcc Bug List <bug-gcc at gnu dot org>
- Organization: CMLA, ENS Cachan -- CNRS UMR 8536 (France)
- References: <87snzs4u02.fsf@cygnus.com>
Tom Tromey <tromey@cygnus.com> writes:
[...]
| If I compile this, I expect to get an error about the use of `func2'
| in the `the_ts' structure. I do get such an error, but the line
| number is wrong:
|
| creche. g++ -fsyntax-only foo.cc
| foo.cc:16: cannot convert `int (*) (int)' to `int (*) ()' in initialization
|
| I expect line 14 and not 16.
Thanks for the report.
For the record, gcc-2.95.2 have a similar behaviour:
poivre% g++ -v; g++ -fsyntax-only 2.C ~
Reading specs from /BASE/dosreis/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/specs
gcc version 2.95.2 19991024 (release)
2.C:16: initialization to `int (*)()' from `int (*)(int)'
-- Gaby