Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework gcc diagnostic color patch #15036

Merged
merged 1 commit into from
Jan 23, 2023
Merged

Rework gcc diagnostic color patch #15036

merged 1 commit into from
Jan 23, 2023

Conversation

Zapeth
Copy link
Contributor

@Zapeth Zapeth commented Jan 13, 2023

Reworked the patch based on method described here -> BurntSushi/ripgrep#94 (comment)
(its mentioned that GetFileInformationByHandleEx wont work for this in Windows XP as opposed to NtQueryObject, but I'm guessing thats not something to consider anymore anyway)

I'm not sure if the check for \cygwin is necessary, its mentioned in the above linked thread so I included it to be safe, but none of the ttys I tested resolved to that name, maybe its from old mintty versions?

Probably fixes #14087 and #8600, I tested it on my system (Win7 x64) and diagnostic output is coloured again by default.

@Zapeth
Copy link
Contributor Author

Zapeth commented Jan 13, 2023

Not sure why CI failed, error doesn't look like its related to my changes (and local compile works)

   ../../../gcc-12.2.0/libcpp/system.h:404:30: error: expected identifier before string constant
    404 | #define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
        |                              ^~~~~~~~
  ../../../gcc-12.2.0/libcpp/system.h:404:30: error: expected ',' or '...' before string constant
  ../../../gcc-12.2.0/libcpp/system.h:404:30: error: expected identifier before string constant
    404 | #define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
        |                              ^~~~~~~~
  ../../../gcc-12.2.0/libcpp/system.h:404:30: error: expected ',' or '...' before string constant
  make[3]: *** [Makefile:227: files.o] Error 1
  checking for ANSI C header files... make[3]: Leaving directory '/C/_/mingw-w64-gcc/src/build-MINGW64/build-x86_64-w64-mingw32/libcpp'
  make[2]: *** [Makefile:3121: all-build-libcpp] Error 2
  make[2]: *** Waiting for unfinished jobs....

@Biswa96
Copy link
Member

Biswa96 commented Jan 13, 2023

Not sure why CI failed, error doesn't look like its related to my changes

Yes, the issue had been fixed in this upstream commit https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=902c755930326cb4405672aa3ea13c35c653cbff. Please make sure it can be applied in current gcc version.

@Zapeth
Copy link
Contributor Author

Zapeth commented Jan 13, 2023

Are you suggesting I should apply the linked commit as a new patch? Shouldn't that be done in a separate PR?

@Biswa96
Copy link
Member

Biswa96 commented Jan 13, 2023

Shouldn't that be done in a separate PR?

Agree, that would be better.

@lazka
Copy link
Member

lazka commented Jan 14, 2023

Shouldn't that be done in a separate PR?

I'll look into that.

@lazka
Copy link
Member

lazka commented Jan 14, 2023

The backport doesn't help. Not sure.

@Biswa96
Copy link
Member

Biswa96 commented Jan 14, 2023

lh_mouse shared a sed command here https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609514.html. Can you try that?

@lazka
Copy link
Member

lazka commented Jan 14, 2023

thanks, I got help on IRC -> #15045

@lazka lazka merged commit 38fc667 into msys2:master Jan 23, 2023
@lazka lazka mentioned this pull request Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mingw-w64-x86_64-gcc's output is not highlighted
3 participants