public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/30225]  New: builtins's decl is copied in some cases where it is not needed to be copied
@ 2006-12-15 18:54 pinskia at gcc dot gnu dot org
  2006-12-15 18:55 ` [Bug c++/30225] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-15 18:54 UTC (permalink / raw)
  To: gcc-bugs

3401    cxx_builtin_function (tree decl)
3402    {
3403      tree          id = DECL_NAME (decl);
3404      const char *name = IDENTIFIER_POINTER (id);
3405      tree       decl2 = copy_node(decl);
3406      /* All builtins that don't begin with an '_' should additionally
3407         go in the 'std' namespace.  */
3408      if (name[0] != '_')
3409        {
3410          push_namespace (std_identifier);
3411          builtin_function_1 (decl, std_node);
3412          pop_namespace ();
3413        }
3414
3415      return builtin_function_1 (decl2, NULL_TREE);
3416    }

If we are not going to add the builtin function into the std namespace, we
don't need to copy the decl


-- 
           Summary: builtins's decl is copied in some cases where it is not
                    needed to be copied
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: memory-hog
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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


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

* [Bug c++/30225] builtins's decl is copied in some cases where it is not needed to be copied
  2006-12-15 18:54 [Bug c++/30225] New: builtins's decl is copied in some cases where it is not needed to be copied pinskia at gcc dot gnu dot org
@ 2006-12-15 18:55 ` pinskia at gcc dot gnu dot org
  2006-12-16  2:19 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-15 18:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-12-15 18:55 -------
I am going to fix this but I am recording this now so I don't forget.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-12-15 18:55:01
               date|                            |


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


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

* [Bug c++/30225] builtins's decl is copied in some cases where it is not needed to be copied
  2006-12-15 18:54 [Bug c++/30225] New: builtins's decl is copied in some cases where it is not needed to be copied pinskia at gcc dot gnu dot org
  2006-12-15 18:55 ` [Bug c++/30225] " pinskia at gcc dot gnu dot org
@ 2006-12-16  2:19 ` pinskia at gcc dot gnu dot org
  2006-12-22  8:31 ` pinskia at gcc dot gnu dot org
  2006-12-22  8:31 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-16  2:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-12-16 02:19 -------
Created an attachment (id=12816)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12816&action=view)
Patch which should fix it


-- 


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


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

* [Bug c++/30225] builtins's decl is copied in some cases where it is not needed to be copied
  2006-12-15 18:54 [Bug c++/30225] New: builtins's decl is copied in some cases where it is not needed to be copied pinskia at gcc dot gnu dot org
  2006-12-15 18:55 ` [Bug c++/30225] " pinskia at gcc dot gnu dot org
  2006-12-16  2:19 ` pinskia at gcc dot gnu dot org
@ 2006-12-22  8:31 ` pinskia at gcc dot gnu dot org
  2006-12-22  8:31 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-22  8:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-12-22 08:31 -------
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


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


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

* [Bug c++/30225] builtins's decl is copied in some cases where it is not needed to be copied
  2006-12-15 18:54 [Bug c++/30225] New: builtins's decl is copied in some cases where it is not needed to be copied pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-12-22  8:31 ` pinskia at gcc dot gnu dot org
@ 2006-12-22  8:31 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-22  8:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-12-22 08:31 -------
Subject: Bug 30225

Author: pinskia
Date: Fri Dec 22 08:31:03 2006
New Revision: 120145

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120145
Log:
2006-12-21  Andrew Pinski  <pinskia@gmail.com>

        PR C++/30225
        * decl.c (cxx_builtin_function): Only copy the decl if adding
        it to the std namespace


Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c


-- 


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


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

end of thread, other threads:[~2006-12-22  8:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-15 18:54 [Bug c++/30225] New: builtins's decl is copied in some cases where it is not needed to be copied pinskia at gcc dot gnu dot org
2006-12-15 18:55 ` [Bug c++/30225] " pinskia at gcc dot gnu dot org
2006-12-16  2:19 ` pinskia at gcc dot gnu dot org
2006-12-22  8:31 ` pinskia at gcc dot gnu dot org
2006-12-22  8:31 ` pinskia at gcc dot gnu dot org

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