[Bug driver/68029] Strange behavior of -fdiagnostics-color option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68029 Jeffrey A. Law changed: What|Removed |Added Status|NEW |RESOLVED CC||law at redhat dot com Resolution|--- |FIXED --- Comment #13 from Jeffrey A. Law --- Fixed on the trunk.
[Bug driver/68029] Strange behavior of -fdiagnostics-color option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68029 --- Comment #12 from Jeffrey A. Law --- Author: law Date: Wed Dec 2 07:42:58 2015 New Revision: 231150 URL: https://gcc.gnu.org/viewcvs?rev=231150=gcc=rev Log: [PATCH] Fix PR68029 PR driver/68029 * opts-common.c (prune_options): Don't ignore -fdiagnostics-color if it is the first parameter. Modified: trunk/gcc/ChangeLog trunk/gcc/opts-common.c
[Bug driver/68029] Strange behavior of -fdiagnostics-color option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68029 --- Comment #10 from Jiří Engelthaler --- Will this bug be resolved in 6.0 release?
[Bug driver/68029] Strange behavior of -fdiagnostics-color option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68029 --- Comment #11 from Manuel López-Ibáñez --- (In reply to Jiří Engelthaler from comment #10) > Will this bug be resolved in 6.0 release? Could you submit your patch to gcc-patc...@gcc.gnu.org? See https://gcc.gnu.org/ml/gcc-patches/2015-11/ for how people do it.
[Bug driver/68029] Strange behavior of -fdiagnostics-color option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68029 --- Comment #7 from Jiří Engelthaler --- Created attachment 36638 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36638=edit diag_color.patch fdiagnostics_color_idx can by on first place so comparing as > 1 will miss it. There should be >= 1
[Bug driver/68029] Strange behavior of -fdiagnostics-color option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68029 --- Comment #9 from Jiří Engelthaler --- (In reply to Manuel López-Ibáñez from comment #8) > > Good catch! In principle your patch seems correct. I think you are only > missing a testcase. This patch is small enough to not require a copyright > assignment: > > https://gcc.gnu.org/wiki/GettingStarted#Basics: > _Contributing_to_GCC_in_10_easy_steps Hi. I'm not able to create a test case because first xgcc parameters are controlled by GCC testsuite itself.
[Bug driver/68029] Strange behavior of -fdiagnostics-color option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68029 --- Comment #8 from Manuel López-Ibáñez --- (In reply to Jiří Engelthaler from comment #7) > Created attachment 36638 [details] > diag_color.patch > > fdiagnostics_color_idx can by on first place so comparing as > 1 will miss > it. > There should be >= 1 Good catch! In principle your patch seems correct. I think you are only missing a testcase. This patch is small enough to not require a copyright assignment: https://gcc.gnu.org/wiki/GettingStarted#Basics:_Contributing_to_GCC_in_10_easy_steps
[Bug driver/68029] Strange behavior of -fdiagnostics-color option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68029 --- Comment #5 from Jiří Engelthaler --- (In reply to Manuel López-Ibáñez from comment #4) > (In reply to Jiří Engelthaler from comment #3) > > (In reply to Manuel López-Ibáñez from comment #2) > > > What does -### show for the call to cc1 ? My commit r228094 to > > > opts-common.c > > > should have fixed this. > > > > $ gcc -fdiagnostics-color=never a.c -### > > cc1.exe -quiet -D__USES_INITFINI__ a.c -quiet -dumpbase a.c -auxbase a -o > > /tmp/cclEySGP.s > > To be honest, I don't have any clue why this is happening. This output seems > to happen before calling any code in opts-common.c as a result of the specs. > But why the specs will be touching -fdiagnostics-color=? I don't know much > about how the specs work. > > If reverting the patch fixes the problem, please go ahead and just reopen > the bug fixed by it. I have tested GCC with reverted r228094 and there is not problem reported by this bug. I'm asking someone with rights to reopen the bug 67640 and link it to this one.
[Bug driver/68029] Strange behavior of -fdiagnostics-color option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68029 --- Comment #3 from Jiří Engelthaler --- (In reply to Manuel López-Ibáñez from comment #2) > What does -### show for the call to cc1 ? My commit r228094 to opts-common.c > should have fixed this. $ gcc -fdiagnostics-color=never a.c -### cc1.exe -quiet -D__USES_INITFINI__ a.c -quiet -dumpbase a.c -auxbase a -o /tmp/cclEySGP.s --- $ gcc -### -fdiagnostics-color=never a.c cc1.exe -quiet -D__USES_INITFINI__ a.c -quiet -dumpbase a.c -auxbase a "-fdiagnostics-color=never" -o /tmp/ccSOGrIR.s --- $ gcc a.c -fdiagnostics-color=never -### cc1.exe -quiet -D__USES_INITFINI__ a.c -quiet -dumpbase a.c -auxbase a "-fdiagnostics-color=never" -o /tmp/ccR4q0g6.s --- $ gcc -### a.c -fdiagnostics-color=never cc1.exe -quiet -D__USES_INITFINI__ a.c -quiet -dumpbase a.c -auxbase a "-fdiagnostics-color=never" -o /tmp/ccc7zgdo.s
[Bug driver/68029] Strange behavior of -fdiagnostics-color option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68029 --- Comment #4 from Manuel López-Ibáñez --- (In reply to Jiří Engelthaler from comment #3) > (In reply to Manuel López-Ibáñez from comment #2) > > What does -### show for the call to cc1 ? My commit r228094 to opts-common.c > > should have fixed this. > > $ gcc -fdiagnostics-color=never a.c -### > cc1.exe -quiet -D__USES_INITFINI__ a.c -quiet -dumpbase a.c -auxbase a -o > /tmp/cclEySGP.s To be honest, I don't have any clue why this is happening. This output seems to happen before calling any code in opts-common.c as a result of the specs. But why the specs will be touching -fdiagnostics-color=? I don't know much about how the specs work. If reverting the patch fixes the problem, please go ahead and just reopen the bug fixed by it.
[Bug driver/68029] Strange behavior of -fdiagnostics-color option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68029 --- Comment #6 from Manuel López-Ibáñez --- (In reply to Jiří Engelthaler from comment #5) > I have tested GCC with reverted r228094 and there is not problem reported by > this bug. > I'm asking someone with rights to reopen the bug 67640 and link it to this > one. I think the bug should be reopened after the patch is reverted. With the patch reverted, do you still see the behavior reported in the description of bug 67640?
[Bug driver/68029] Strange behavior of -fdiagnostics-color option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68029 Manuel López-Ibáñez changed: What|Removed |Added CC||manu at gcc dot gnu.org --- Comment #2 from Manuel López-Ibáñez --- What does -### show for the call to cc1 ? My commit r228094 to opts-common.c should have fixed this.
[Bug driver/68029] Strange behavior of -fdiagnostics-color option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68029 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2015-10-22 CC||mpolacek at gcc dot gnu.org Component|c |driver Ever confirmed|0 |1 --- Comment #1 from Marek Polacek --- Confirmed.