public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/22573] typedef in class scope not reported by error message
       [not found] <bug-22573-2045@http.gcc.gnu.org/bugzilla/>
@ 2005-11-30 17:44 ` gdr at gcc dot gnu dot org
  2005-11-30 19:01 ` brad dot king at kitware dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-11-30 17:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from gdr at gcc dot gnu dot org  2005-11-30 17:43 -------
(In reply to comment #2)
> Absolutely not! There is no "best" way: sometimes it is better to go through 
> the typedef, sometimes it is better to print the typedef.
> 
> To tell you the truth, I consider the fact that GCC prints both a *feature*.
> 
> However, we should decide whether the inconsistency is a bug. Gaby?

I don't think there is "the best" way to deal with this.
One can think of moving to diagnostic with carrets so that we print
what user wrote; but that does not solve the core issue (see exiting
compilers that hve diagnostic-with-carrets), especially when getting
messages from instantiation contexts.

I don't consider it a bug.


-- 

gdr at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME


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


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

* [Bug c++/22573] typedef in class scope not reported by error message
       [not found] <bug-22573-2045@http.gcc.gnu.org/bugzilla/>
  2005-11-30 17:44 ` [Bug c++/22573] typedef in class scope not reported by error message gdr at gcc dot gnu dot org
@ 2005-11-30 19:01 ` brad dot king at kitware dot com
  2005-11-30 20:19 ` gdr at integrable-solutions dot net
  2005-12-02 15:31 ` brad dot king at kitware dot com
  3 siblings, 0 replies; 6+ messages in thread
From: brad dot king at kitware dot com @ 2005-11-30 19:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from brad dot king at kitware dot com  2005-11-30 19:01 -------
Okay, if you don't consider it a bug that is fine with me.  I just reported it
to make sure you were aware of the inconsistency.  I'm changing this bug's
status to Verified.

Meanwhile I'm still a bit curious as to where in the source the argument's true
type as written by the user is lost ("dereferenced").  Why is it lost only for
class-scope typedefs and not for namespace-scope ones?  I'm somewhat familiar
with the internals of GCC and can read the output of -fdump-translation-unit
but I could not find the spot that loses this information.  Any pointers are
appreciated.  Thanks.


-- 

brad dot king at kitware dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED


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


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

* [Bug c++/22573] typedef in class scope not reported by error message
       [not found] <bug-22573-2045@http.gcc.gnu.org/bugzilla/>
  2005-11-30 17:44 ` [Bug c++/22573] typedef in class scope not reported by error message gdr at gcc dot gnu dot org
  2005-11-30 19:01 ` brad dot king at kitware dot com
@ 2005-11-30 20:19 ` gdr at integrable-solutions dot net
  2005-12-02 15:31 ` brad dot king at kitware dot com
  3 siblings, 0 replies; 6+ messages in thread
From: gdr at integrable-solutions dot net @ 2005-11-30 20:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from gdr at integrable-solutions dot net  2005-11-30 20:19 -------
Subject: Re:  typedef in class scope not reported by error message

"brad dot king at kitware dot com" <gcc-bugzilla@gcc.gnu.org> writes:

| Okay, if you don't consider it a bug that is fine with me.  I just reported
it
| to make sure you were aware of the inconsistency.  I'm changing this bug's
| status to Verified.

I don't want to leave you under the impression that your report was
dismissed as unimportant.  Quite the contrary.  There is a furious
debate in the user community about what the right thing should be.  It
is not clear and there does not seem be a right way of doing it.
We're well aware of this issue; we're trying to do our best.  I
understand not everybody is happy, but is not an issue we can make
everybody happy.

| Meanwhile I'm still a bit curious as to where in the source the
| argument's true type as written by the user is lost
| ("dereferenced").  Why is it lost only for class-scope typedefs and
| not for namespace-scope ones? 

all those are good questions I don't have the answer for yet.  But, if
you dig the archive (gcc-patches) you'll have a hint from a recent
patch of Mark Mitchell and another hint about the on-going debate.

| I'm somewhat familiar 
| with the internals of GCC and can read the output of -fdump-translation-unit
| but I could not find the spot that loses this information.  Any pointers are
| appreciated.  Thanks.

-fdump-translation-unit is broken at the present; and if it did work,
 it won't help you much.  Search for a recent patch of Mark Mitchell
about canonicalizing types.

-- Gaby


-- 


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


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

* [Bug c++/22573] typedef in class scope not reported by error message
       [not found] <bug-22573-2045@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2005-11-30 20:19 ` gdr at integrable-solutions dot net
@ 2005-12-02 15:31 ` brad dot king at kitware dot com
  3 siblings, 0 replies; 6+ messages in thread
From: brad dot king at kitware dot com @ 2005-12-02 15:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from brad dot king at kitware dot com  2005-12-02 15:31 -------
Thanks for the pointer.  I think I found the message to which you refer.  For
the archive here it is:

http://gcc.gnu.org/ml/gcc-patches/2005-10/msg01052.html


-- 


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


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

* [Bug c++/22573] typedef in class scope not reported by error message
  2005-07-20 18:08 [Bug c++/22573] New: " brad dot king at kitware dot com
  2005-07-20 18:22 ` [Bug c++/22573] " pinskia at gcc dot gnu dot org
@ 2005-07-20 18:27 ` giovannibajo at libero dot it
  1 sibling, 0 replies; 6+ messages in thread
From: giovannibajo at libero dot it @ 2005-07-20 18:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2005-07-20 18:22 -------
Absolutely not! There is no "best" way: sometimes it is better to go through 
the typedef, sometimes it is better to print the typedef.

To tell you the truth, I consider the fact that GCC prints both a *feature*.

However, we should decide whether the inconsistency is a bug. Gaby?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gdr at gcc dot gnu dot org


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


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

* [Bug c++/22573] typedef in class scope not reported by error message
  2005-07-20 18:08 [Bug c++/22573] New: " brad dot king at kitware dot com
@ 2005-07-20 18:22 ` pinskia at gcc dot gnu dot org
  2005-07-20 18:27 ` giovannibajo at libero dot it
  1 sibling, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-20 18:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-20 18:08 -------
Confirmed, before 3.4.0, we produced something different:
t.cc: In function `int main()':
t.cc:11: error: no matching function for call to `N::A::f(int)'
t.cc:5: error: candidates are: void N::A::f(int, float)

Which is really much worse.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |diagnostic
      Known to fail|                            |3.4.0 4.0.0 4.1.0
   Last reconfirmed|0000-00-00 00:00:00         |2005-07-20 18:08:28
               date|                            |


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


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

end of thread, other threads:[~2005-12-02 15:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-22573-2045@http.gcc.gnu.org/bugzilla/>
2005-11-30 17:44 ` [Bug c++/22573] typedef in class scope not reported by error message gdr at gcc dot gnu dot org
2005-11-30 19:01 ` brad dot king at kitware dot com
2005-11-30 20:19 ` gdr at integrable-solutions dot net
2005-12-02 15:31 ` brad dot king at kitware dot com
2005-07-20 18:08 [Bug c++/22573] New: " brad dot king at kitware dot com
2005-07-20 18:22 ` [Bug c++/22573] " pinskia at gcc dot gnu dot org
2005-07-20 18:27 ` giovannibajo at libero dot it

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).