public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19073] cp_binding_level::names not returning all decls
       [not found] <bug-19073-4@http.gcc.gnu.org/bugzilla/>
@ 2024-02-16 18:02 ` mpolacek at gcc dot gnu.org
  0 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-02-16 18:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19073

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WORKSFORME
                 CC|                            |mpolacek at gcc dot gnu.org
             Status|NEW                         |RESOLVED

--- Comment #13 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
It doesn't appear there's anything to do here.

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

* [Bug c++/19073] cp_binding_level::names not returning all decls
  2004-12-19  0:41 [Bug c++/19073] New: cp_namespace_decl " sstrasser at systemhaus-gruppe dot de
                   ` (7 preceding siblings ...)
  2005-05-15 16:21 ` sstrasser at systemhaus-gruppe dot de
@ 2005-05-15 16:47 ` gdr at integrable-solutions dot net
  8 siblings, 0 replies; 10+ messages in thread
From: gdr at integrable-solutions dot net @ 2005-05-15 16:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2005-05-15 16:47 -------
Subject: Re:  cp_binding_level::names not returning all decls

"sstrasser at systemhaus-gruppe dot de" <gcc-bugzilla@gcc.gnu.org> writes:

| (In reply to comment #9)
| > only if it may be needed there in the future.  Perhaps a solution would be
| > adding every name there when -fdump-translation-unit is given (at the 
| expense of
| > some extra memory consumption, slower compilation).
| 
| in case you plan to to this: the above mentioned case seems to be the only one.
| I've fixed this in my project MetaC++ by just commenting out the 4 lines above.
| which probably introduces other bugs and so is no solution for -fdump..., but 
| what I'm trying to say is that this is the only case where GCC does not add a 
| name to cp_binding_level::names

The more I think about this, the more I'm wondering whether
cp_binding_level::names is the proper way to get the real functionality. 


-- 


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


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

* [Bug c++/19073] cp_binding_level::names not returning all decls
  2004-12-19  0:41 [Bug c++/19073] New: cp_namespace_decl " sstrasser at systemhaus-gruppe dot de
                   ` (6 preceding siblings ...)
  2005-05-15 11:46 ` lerdsuwa at gcc dot gnu dot org
@ 2005-05-15 16:21 ` sstrasser at systemhaus-gruppe dot de
  2005-05-15 16:47 ` gdr at integrable-solutions dot net
  8 siblings, 0 replies; 10+ messages in thread
From: sstrasser at systemhaus-gruppe dot de @ 2005-05-15 16:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From sstrasser at systemhaus-gruppe dot de  2005-05-15 16:17 -------
(In reply to comment #9)
> only if it may be needed there in the future.  Perhaps a solution would be
> adding every name there when -fdump-translation-unit is given (at the 
expense of
> some extra memory consumption, slower compilation).

in case you plan to to this: the above mentioned case seems to be the only one.
I've fixed this in my project MetaC++ by just commenting out the 4 lines above.
which probably introduces other bugs and so is no solution for -fdump..., but 
what I'm trying to say is that this is the only case where GCC does not add a 
name to cp_binding_level::names


-- 


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


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

* [Bug c++/19073] cp_binding_level::names not returning all decls
  2004-12-19  0:41 [Bug c++/19073] New: cp_namespace_decl " sstrasser at systemhaus-gruppe dot de
                   ` (5 preceding siblings ...)
  2004-12-20  3:53 ` pinskia at gcc dot gnu dot org
@ 2005-05-15 11:46 ` lerdsuwa at gcc dot gnu dot org
  2005-05-15 16:21 ` sstrasser at systemhaus-gruppe dot de
  2005-05-15 16:47 ` gdr at integrable-solutions dot net
  8 siblings, 0 replies; 10+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2005-05-15 11:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2005-05-15 11:46 -------
Some comment: This cp_binding_level::names and how it is used are internal to GCC.  
Too bad -fdump-translation-unit relies on it.  Names are placed in
cp_binding_level::names
only if it may be needed there in the future.  Perhaps a solution would be
adding every name there when -fdump-translation-unit is given (at the expense of
some extra memory consumption, slower compilation).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-05-15 11:46:40
               date|                            |


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


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

* [Bug c++/19073] cp_binding_level::names not returning all decls
  2004-12-19  0:41 [Bug c++/19073] New: cp_namespace_decl " sstrasser at systemhaus-gruppe dot de
                   ` (4 preceding siblings ...)
  2004-12-20  3:42 ` sstrasser at systemhaus-gruppe dot de
@ 2004-12-20  3:53 ` pinskia at gcc dot gnu dot org
  2005-05-15 11:46 ` lerdsuwa at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-20  3:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-20 03:53 -------
(In reply to comment #7)
> I understand what they're doing but I don't understand why they are at this
> point and were introduced in decl.c version 1.1114.
> the cvs log message doesn't contain anything that's useful to me either.
> why are these lines there? before this there was no assignment to binding->value
> at all.

http://gcc.gnu.org/ml/gcc-patches/2003-08/msg01155.html
"  The bug report had to do with allowing invalid elaborated type
  specifiers.  The root cause was that we were treating
  namespace-scope bindings differently from local and class bindings;
  this patch makes things more uniform."

-- 


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


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

* [Bug c++/19073] cp_binding_level::names not returning all decls
  2004-12-19  0:41 [Bug c++/19073] New: cp_namespace_decl " sstrasser at systemhaus-gruppe dot de
                   ` (3 preceding siblings ...)
  2004-12-19 16:10 ` pcarlini at suse dot de
@ 2004-12-20  3:42 ` sstrasser at systemhaus-gruppe dot de
  2004-12-20  3:53 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sstrasser at systemhaus-gruppe dot de @ 2004-12-20  3:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From sstrasser at systemhaus-gruppe dot de  2004-12-20 03:42 -------
ok, I took a closer look at this.
we all agree that type_decls(even c++ implicit ones) should be in
cp_binding_level::names, don't we?

decls get added to this list by name-lookup.c add_decl_to_level(), which gets
called by name-lookup.c:pushdecl()
pushdecl() checks if there is already a binding for the decl(via
namespace_binding()).
if there is(which is the case for the implicit type decls in current version),
it only calls add_decl_to_level() under certain circumstances, one of these is:
not being a TYPE_DECL.

in gcc version 3.3.4(which doesn't have this problem) namespace_binding()
returns 0, there is no binding, in current CVS there is.
so, why is this?

because of these lines in name-lookup.c:set_identifier_type_value_with_scope:
	  if (binding->value)
	    supplement_binding (binding, decl);
	  else
	    binding->value = decl;

I understand what they're doing but I don't understand why they are at this
point and were introduced in decl.c version 1.1114.
the cvs log message doesn't contain anything that's useful to me either.
why are these lines there? before this there was no assignment to binding->value
at all.

Thanks for your help

-- 


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


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

* [Bug c++/19073] cp_binding_level::names not returning all decls
  2004-12-19  0:41 [Bug c++/19073] New: cp_namespace_decl " sstrasser at systemhaus-gruppe dot de
                   ` (2 preceding siblings ...)
  2004-12-19 15:32 ` gdr at integrable-solutions dot net
@ 2004-12-19 16:10 ` pcarlini at suse dot de
  2004-12-20  3:42 ` sstrasser at systemhaus-gruppe dot de
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pcarlini at suse dot de @ 2004-12-19 16:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2004-12-19 16:09 -------
> Removing -fdump-translation-unit is a good step to make GCC more
> useless;

Hey, I really hope there is a typo here, and you actually mean
"less useful" ;)

-- 


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


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

* [Bug c++/19073] cp_binding_level::names not returning all decls
  2004-12-19  0:41 [Bug c++/19073] New: cp_namespace_decl " sstrasser at systemhaus-gruppe dot de
  2004-12-19  3:35 ` [Bug c++/19073] cp_binding_level::names " sstrasser at systemhaus-gruppe dot de
  2004-12-19  3:47 ` sstrasser at systemhaus-gruppe dot de
@ 2004-12-19 15:32 ` gdr at integrable-solutions dot net
  2004-12-19 16:10 ` pcarlini at suse dot de
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-12-19 15:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2004-12-19 15:31 -------
Subject: Re:  cp_namespace_decl not returning all decls

"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| I think -fdump-translation-unit should be removed, it is only useful

Removing -fdump-translation-unit is a good step to make GCC more
useless; it does not fix the problem.

-- Gaby


-- 


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


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

* [Bug c++/19073] cp_binding_level::names not returning all decls
  2004-12-19  0:41 [Bug c++/19073] New: cp_namespace_decl " sstrasser at systemhaus-gruppe dot de
  2004-12-19  3:35 ` [Bug c++/19073] cp_binding_level::names " sstrasser at systemhaus-gruppe dot de
@ 2004-12-19  3:47 ` sstrasser at systemhaus-gruppe dot de
  2004-12-19 15:32 ` gdr at integrable-solutions dot net
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sstrasser at systemhaus-gruppe dot de @ 2004-12-19  3:47 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|cp_binding_level            |cp_binding_level::names not
                   |                            |returning all decls


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


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

* [Bug c++/19073] cp_binding_level::names not returning all decls
  2004-12-19  0:41 [Bug c++/19073] New: cp_namespace_decl " sstrasser at systemhaus-gruppe dot de
@ 2004-12-19  3:35 ` sstrasser at systemhaus-gruppe dot de
  2004-12-19  3:47 ` sstrasser at systemhaus-gruppe dot de
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sstrasser at systemhaus-gruppe dot de @ 2004-12-19  3:35 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|cp_namespace_decl not       |cp_binding_level::names not
                   |returning all decls         |returning all decls


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


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

end of thread, other threads:[~2024-02-16 18:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-19073-4@http.gcc.gnu.org/bugzilla/>
2024-02-16 18:02 ` [Bug c++/19073] cp_binding_level::names not returning all decls mpolacek at gcc dot gnu.org
2004-12-19  0:41 [Bug c++/19073] New: cp_namespace_decl " sstrasser at systemhaus-gruppe dot de
2004-12-19  3:35 ` [Bug c++/19073] cp_binding_level::names " sstrasser at systemhaus-gruppe dot de
2004-12-19  3:47 ` sstrasser at systemhaus-gruppe dot de
2004-12-19 15:32 ` gdr at integrable-solutions dot net
2004-12-19 16:10 ` pcarlini at suse dot de
2004-12-20  3:42 ` sstrasser at systemhaus-gruppe dot de
2004-12-20  3:53 ` pinskia at gcc dot gnu dot org
2005-05-15 11:46 ` lerdsuwa at gcc dot gnu dot org
2005-05-15 16:21 ` sstrasser at systemhaus-gruppe dot de
2005-05-15 16:47 ` gdr at integrable-solutions dot net

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