Marek Polacek a écrit:
> On Wed, Aug 13, 2014 at 09:03:37PM +0200, Manuel López-Ibáñez wrote:
>> I don't think this is the right fix. The problem is that we are trying
>> to print the caret in a column that is larger than the line_width. We
>> do this because the file given by the line directive
On Wed, Aug 13, 2014 at 09:03:37PM +0200, Manuel López-Ibáñez wrote:
> I don't think this is the right fix. The problem is that we are trying
> to print the caret in a column that is larger than the line_width. We
> do this because the file given by the line directive has nothing to do
> with the a
> This should fix an undefined behavior in diagnostics.c.
> Under certain circumstances, max_width is (INT_MAX - 1),
> and right_margin is -4 -> the subtraction overflows.
> Changing the types to unsigned would involve changing
> much more code than just one cast.
>
> BTW, the diagnostics we output
This should fix an undefined behavior in diagnostics.c.
Under certain circumstances, max_width is (INT_MAX - 1),
and right_margin is -4 -> the subtraction overflows.
Changing the types to unsigned would involve changing
much more code than just one cast.
BTW, the diagnostics we output for the test