This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/53525] Performance regression due to enabling track-macro-expansion
- From: "jimis at gmx dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 30 May 2012 04:52:20 +0000
- Subject: [Bug preprocessor/53525] Performance regression due to enabling track-macro-expansion
- Auto-submitted: auto-generated
- References: <bug-53525-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53525
--- Comment #3 from jimis <jimis at gmx dot net> 2012-05-30 04:52:20 UTC ---
Another simple one that my eye caught but does not effect performance.
Generally I don't get many things in macro.c, but am I correct to assume that
the following stands?
=== modified file 'libcpp/macro.c'
--- libcpp/macro.c 2012-05-02 16:55:19 +0000
+++ libcpp/macro.c 2012-05-27 06:55:37 +0000
@@ -1897,10 +1897,9 @@ tokens_buff_new (cpp_reader *pfile, size
source_location **virt_locs)
{
size_t tokens_size = len * sizeof (cpp_token *);
- size_t locs_size = len * sizeof (source_location);
if (virt_locs != NULL)
- *virt_locs = XNEWVEC (source_location, locs_size);
+ *virt_locs = XNEWVEC (source_location, len);
return _cpp_get_buff (pfile, tokens_size);
}