This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Class-through-ellipsis warning
- To: <gcc at gcc dot gnu dot org>
- Subject: Re: Class-through-ellipsis warning
- From: "Artem Khodush" <artem at duma dot gov dot ru>
- Date: Thu, 19 Apr 2001 10:07:48 +0400
- >Received: from artem by mailsrv.duma.gov.ru (SMI-8.6/SMI-SVR4)id KAA18042; Thu, 19 Apr 2001 10:10:08 +0400
- Cc: "Ross Smith" <ross dot s at ihug dot co dot nz>
- References: <3ADE6F99.3806FB4D@ihug.co.nz>
Ross Smith wrote:
> Is there any way (besides -w) of turning off the "cannot pass objects of
> type `<class>' through `...'" warning?
Currently, no. Some time ago I wrote the patch to suppress this
warning if the function taking ... was marked __attribute__(unused),
but later I realized that unused was not designed for things like this,
so I did not submit the patch. Now I think that the better way to
do this is to suppress the warning somehow when the function is
called from inside sizeof. (Not that I know how it can be done,
but if there will be sufficient interest, and no one more qualified
than me will step in, I will look into it).
> (If you're wondering why I want to do that, see section 2.7 of Andrei
> Alexandrescu's _Modern C++ Design_.)
>
If I understand correcty, this is about determining at comple time
whether there is implicit conversion between arbitrary types, right?
There was Andrei's article on the topic somewhere on the C++ Report
web site.
Best regards,
Artem.