I am running GCC 13.1.0 under msys2 on windows, and am encountering an issue where it outputs errors with a white background, making white-colored text unreadable without getting painfully close to my screen. I am running GCC in Command Prompt. The issue started when I changed CMD’s background color to white. It worked fine (the text was completely readable) when the background was white, but when I changed it back, it seems to want to stick to the white background. GCC is not only printing white backgrounds for the characters, but is actually changing CMD’s color settings – I verified this by reopening the color options dialog after compiling my project.
I tried changing CMD’s color settings back to the defaults multiple times. I compiled my project and it worked fine as expected, but later on when there was an error in the code the issue reappeared. It seems the issue only occurs when there is colored output, such as when there are errors. I also cleared HKEY_CURRENT_USERConsole, exited and reopened Command Prompt and tried again, but it still happened. Lastly, I tried searching for configuration files in C:msys64mingw64, but found nothing in any of the folders containing “gcc”. Am I missing something, or is this a bug? The GCC_COLORS environment variable doesn’t seem to change anything on windows, so I am very unsure what is causing this.
user25017412 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.