This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING] C++ Re: [PATCH] C/C++: fix quoting of "aka" typedef information (PR 62170)

On Tue, 2017-06-20 at 14:01 -0400, Jason Merrill wrote:
> On Tue, Jun 20, 2017 at 1:58 PM, Jason Merrill <>
> wrote:
> > On Tue, Jun 20, 2017 at 11:50 AM, David Malcolm <
> >> wrote:
> > > > +       ob->next_free = p + type_start + type_len;
> > 
> > I'm uncomfortable with modifying the obstack directly.  Why not use
> > obstack_free?
> ...because you aren't freeing the object, but shrinking it.  So
> obstack_blank is a better choice.


As of r229987 ("Copy gnulib obstack files", aka

libiberty/obstacks.texi says:
> @cindex shrinking objects
> You can use @code{obstack_blank_fast} with a ``negative'' size
> argument to make the current object smaller.  Just don't try to
> shrink it beyond zero length---there's no telling what will happen 
> if you do that.  Earlier versions of obstacks allowed you to use
> @code{obstack_blank} to shrink objects.  This will no longer work.

It's not clear to me what the issue alluded to with negative
obstack_blank is, but I chose to follow the above docs and use
obstack_blank_fast; am testing an updated patch in which the above line
now looks like:

	  obstack_blank_fast (ob, -(type_start + type_len));

Is the patch OK with that change? (assuming bootstrap&regrtesting
pass), or should I re-post?

On a related matter, this patch conflicts with Volker's patch here:

in which he removes the trailing "{enum}" info (and hence all of our
changes to the testsuite conflict between the two patches...)

Do you have any thoughts on that other patch? [Ccing Volker]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]