[PATCH] Remove hardcoded limit on max error message length
Tobias Schlüter
tobias.schlueter@physik.uni-muenchen.de
Thu Jul 14 08:39:00 GMT 2005
Jakub Jelinek wrote:
> On Wed, Jul 13, 2005 at 11:16:56PM +0200, Tobias Schl?ter wrote:
>>From the above I'm not 100% sure what exactly you are suggesting.
> Is that:
> 1) making the message be a flexible array member of the structure?
> That doesn't sound to be an advantage, as gfc_{push,pop,free}_error
> would need to use something else, and we'd have to allocate the
> structure separately first
> 2) putting a message buffer with fixed limit into the structure
> and just use some malloced buffer instead when we go over that
> initial limit?
> 3) just using an index into the array instead of pointer
> (i.e. replacing cur_ptr with index)?
>
> 3) would simplify the code, 2) would complicate it, but avoid some
> malloc/free calls, 1) I don't see as an advantage.
I thought of 1) + 3), of course I didn't think of the fact that array indices
can also be used on pointers :-) Please do convert this to use index
arithmetic, as this casting back and forth between pointers and size_t's
obscures stuff in my opinion.
>>Otherwise this is ok. How did you find the place where you inserted
>>gfc_free_error? Is that list exhaustive?
>
>
> Yes, it is exhaustive. I have grepped for all occurences of
> gfc_(push|pop)_error and checked them all.
Thanks, that's what I thought.
- Tobi
More information about the Gcc-patches
mailing list