This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PR c++/17788] add decl for implicit default ctor even if ill-formed
On Feb 14, 2005, Jason Merrill <jason@redhat.com> wrote:
> On 14 Feb 2005 15:20:05 -0200, Alexandre Oliva <aoliva@redhat.com> wrote:
>> +// In ISO C++ 1998, it is not illegal to define such a class, but if
>> +// the implicitly-declared constructor is used, then it is
>> +// implicitly defined and found to be ill-formed.
> Please clarify that this comment refers to the derived class, not to
> struct0.
'k
> Why is your change to the DECL_SOURCE_LOCATION code necessary?
Because otherwise we get all such error messages pointing to the
location of the final input token, when we expand delayed functions
and lazily-defined ctors/dtors/etc.
The intent was clearly to get them point to the decl or use location,
but it hasn't worked like that any more for God knows how long.
Errors have been emitted off of input_location.
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}