public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35955]  New: -Wignored-qualifiers produce different output with/without typedef
@ 2008-04-16  7:08 dimhen at gmail dot com
  2008-04-16  7:48 ` Andrew Pinski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dimhen at gmail dot com @ 2008-04-16  7:08 UTC (permalink / raw)
  To: gcc-bugs

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

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/35955] -Wignored-qualifiers produce different output with/without typedef
  2008-04-16  7:08 [Bug c++/35955] New: -Wignored-qualifiers produce different output with/without typedef dimhen at gmail dot com
  2008-04-16  7:48 ` Andrew Pinski
@ 2008-04-16  7:48 ` pinskia at gmail dot com
  2008-04-16  8:20 ` dimhen at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gmail dot com @ 2008-04-16  7:48 UTC (permalink / raw)
  To: gcc-bugs



------- 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" <gcc-bugzilla@gcc.gnu.org 
 > 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bug c++/35955]  New: -Wignored-qualifiers produce different output with/without typedef
  2008-04-16  7:08 [Bug c++/35955] New: -Wignored-qualifiers produce different output with/without typedef dimhen at gmail dot com
@ 2008-04-16  7:48 ` Andrew Pinski
  2008-04-16  7:48 ` [Bug c++/35955] " pinskia at gmail dot com
  2008-04-16  8:20 ` dimhen at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Pinski @ 2008-04-16  7:48 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs



Sent from my iPhone

On Apr 16, 2008, at 0:07, "dimhen at gmail dot com" <gcc-bugzilla@gcc.gnu.org 
 > 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
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/35955] -Wignored-qualifiers produce different output with/without typedef
  2008-04-16  7:08 [Bug c++/35955] New: -Wignored-qualifiers produce different output with/without typedef dimhen at gmail dot com
  2008-04-16  7:48 ` Andrew Pinski
  2008-04-16  7:48 ` [Bug c++/35955] " pinskia at gmail dot com
@ 2008-04-16  8:20 ` dimhen at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: dimhen at gmail dot com @ 2008-04-16  8:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dimhen at gmail dot com  2008-04-16 08:19 -------
Function according C/C++ specs


-- 

dimhen at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-16  8:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-16  7:08 [Bug c++/35955] New: -Wignored-qualifiers produce different output with/without typedef dimhen at gmail dot com
2008-04-16  7:48 ` Andrew Pinski
2008-04-16  7:48 ` [Bug c++/35955] " pinskia at gmail dot com
2008-04-16  8:20 ` dimhen at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).