------- Comment #1 from pinskia at gmail dot com  2008-04-16 07:48 -------
Subject: Re:   New: -Wignored-qualifiers produce different output with/without
typedef



Sent from my iPhone

On Apr 16, 2008, at 0:07, "dimhen at gmail dot com" <[EMAIL PROTECTED] 
 > wrote:

> g++ -v
> Using built-in specs.
> Target: i686-pc-linux-gnu
> Configured with: ../gcc_current/configure
> --prefix=/usr/local/i686-pc-linux-gnu-current
> --enable-version-specific-runtime-libs --enable-checking=yes
> --enable-languages=c,c++
> Thread model: posix
> gcc version 4.4.0 20080416 (experimental) [trunk revision 134340]  
> (GCC)
>
> g++ -Wignored-qualifiers -c t.cpp
> t.cpp:5: warning: type qualifiers ignored on function return type

This warning is correct, with the typedef the const applies to the  
pointer type and not the what the pointer points to.


>
>
> typedef int* pint;
> class C
> {
>    operator const int*();
>    operator const pint();
> };
>
>
> -- 
>           Summary: -Wignored-qualifiers produce different output
>                    with/without typedef
>           Product: gcc
>           Version: 4.4.0
>            Status: UNCONFIRMED
>          Severity: normal
>          Priority: P3
>         Component: c++
>        AssignedTo: unassigned at gcc dot gnu dot org
>        ReportedBy: dimhen at gmail dot com
> GCC build triplet: i686-pc-linux-gnu
>  GCC host triplet: i686-pc-linux-gnu
> GCC target triplet: i686-pc-linux-gnu
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35955
>


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35955

Reply via email to