## Wrong column number in shader compilation info log

## Submitted by Ruslan Kabatsayev

Assigned to **Ian Romanick**

## Description

Consider the following fragment shader:

void main() { int N=100; float floA=0.9, floB=234.9;

`float x0=(floA-0.5*N)/floB;`

float x1=(floA-0.5*N)/floB;
float x2=(floA-0.5*N)/floB;
float x3=(floA-0.5*N)/floB;
gl_FragColor=vec4(0);
}

Notice the different indentation levels of lines with x0,x1,x2,x3.

Since there's no #version directive here, it's GLSL 1.10, so the implicit conversions are not available at all. So glCompileShader results in the following info log:

0:6(17): error: could not implicitly convert operands to arithmetic operator 0:6(12): error: operands to arithmetic operators must be numeric 0:6(11): error: operands to arithmetic operators must be numeric 0:7(17): error: could not implicitly convert operands to arithmetic operator 0:7(12): error: operands to arithmetic operators must be numeric 0:7(11): error: operands to arithmetic operators must be numeric 0:8(17): error: could not implicitly convert operands to arithmetic operator 0:8(12): error: operands to arithmetic operators must be numeric 0:8(11): error: operands to arithmetic operators must be numeric 0:9(16): error: could not implicitly convert operands to arithmetic operator 0:9(11): error: operands to arithmetic operators must be numeric 0:9(10): error: operands to arithmetic operators must be numeric

So far so good. But you can see that column 17 is always given for indented lines in the "could not convert" message (similar problem is with "must be numeric" lines) regardless of indentation level, and only when there're no spaces before the line is the column reported differently. Actually correct columns are in the last two instances of "could not convert" message: it looks like the string is first simplified by merging repeated whitespace into one space, and only then the column is counted. Of course, this is misleading and actually somewhat useless to the reader, which doesn't understand what happens with the message.

So the fix should be either to show correct column numbers, or not to show column at all.

Version: 10.3