Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a C compiler flag that allows case insensitivity?

I'm just wondering, is it possible to instruct GCC (or another compiler) that I dont want case-sensitivity in my C code?

If thats impossible, then another option would be to have a compiler-flag that throws an error when it finds two global variabeles/functions, with the same name, and different casing.

like image 581
Maestro Avatar asked Oct 13 '25 09:10

Maestro


1 Answers

Strange question.... C is a case sensitive language, it seems to me that is impossible to find a case insensitive compiler.

A possible solution is to parse source code before and lower each caracters, and after that compile it.

EDIT : According comments, I discourage to parse code to change case of caracters, causing some trouble with libraries

like image 114
Garf365 Avatar answered Oct 15 '25 00:10

Garf365