Reading GLSL specification section 3.1. Character Set and Phases of Compilation, strictly speaking, no kind of white space is mentioned as allowed. This is probably a mistake?
Meanwhile,
The source character set used for the OpenGL Shading Language is Unicode in the UTF-8 encoding scheme.
says encoding is unicode. In unicode, BOM can be considered "zero width no-break space" (at least according to https://en.wikipedia.org/wiki/Non-breaking_space). This leaves open the question regarding how BOM should be treated. I know at least one OpenGL implementation where shader program linking fails when shader source contains BOM.
Reading GLSL specification section 3.1. Character Set and Phases of Compilation, strictly speaking, no kind of white space is mentioned as allowed. This is probably a mistake?
Meanwhile,
says encoding is unicode. In unicode, BOM can be considered "zero width no-break space" (at least according to https://en.wikipedia.org/wiki/Non-breaking_space). This leaves open the question regarding how BOM should be treated. I know at least one OpenGL implementation where shader program linking fails when shader source contains BOM.