public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/40251] New: Using the -V option makes the compiler to exit with 0 exit code on error
@ 2009-05-26 6:38 zoltan at bendor dot com dot au
2009-05-29 2:49 ` [Bug driver/40251] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: zoltan at bendor dot com dot au @ 2009-05-26 6:38 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2076 bytes --]
If a file has errors and gcc gets the -V X.X.X command line option, then the
exit code is 0. The following illustrates it:
[zoltan manocska]~>arm-elf-gcc --version
arm-elf-gcc (GCC) 4.4.0
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[zoltan manocska]~>echo "@" > test.c
[zoltan manocska]~>arm-elf-gcc -c test.c
test.c:1: error: stray @ in program
[zoltan manocska]~>echo $?
1
[zoltan manocska]~>arm-elf-gcc -V 4.4.0 -c test.c
test.c:1: error: stray @ in program
[zoltan manocska]~>echo $?
0
[zoltan manocska]~>arm-elf-gcc -V 4.0.2 -c test.c
test.c:1: error: stray @ in program
[zoltan manocska]~>echo $?
0
In a makefile, where a specific compiler is chosen, this bug causes very severe
headaches. I don't know if it's true for all targets, but I tried it with
arm-elf and mips-elf, they both show the same erroneous behaviour. Before the
4.4.0 compiler was installed, the 4.0.2 compiler did not exhibit this bug:
[zoltan manocska]~>arm-elf-gcc-4.0.2 -c test.c
test.c:1: error: stray @ in program
[zoltan manocska]~>echo $?
1
[zoltan manocska]~>arm-elf-gcc-4.0.2 -V 4.0.2 -c test.c
test.c:1: error: stray @ in program
[zoltan manocska]~>echo $?
1
[zoltan manocska]~>arm-elf-gcc-4.0.2 -V 4.4.0 -c test.c
test.c:1: error: stray @ in program
[zoltan manocska]~>echo $?
1
--
Summary: Using the -V option makes the compiler to exit with 0
exit code on error
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zoltan at bendor dot com dot au
GCC host triplet: x86-elf-linux
GCC target triplet: arm-elf-none
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40251
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug driver/40251] Using the -V option makes the compiler to exit with 0 exit code on error
2009-05-26 6:38 [Bug c/40251] New: Using the -V option makes the compiler to exit with 0 exit code on error zoltan at bendor dot com dot au
@ 2009-05-29 2:49 ` pinskia at gcc dot gnu dot org
2009-05-29 10:06 ` joseph at codesourcery dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-05-29 2:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2009-05-29 02:49 -------
I have been noticing weird issues with -V option too like the -o option not
being passed correctly and such.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
Component|c |driver
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40251
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug driver/40251] Using the -V option makes the compiler to exit with 0 exit code on error
2009-05-26 6:38 [Bug c/40251] New: Using the -V option makes the compiler to exit with 0 exit code on error zoltan at bendor dot com dot au
2009-05-29 2:49 ` [Bug driver/40251] " pinskia at gcc dot gnu dot org
@ 2009-05-29 10:06 ` joseph at codesourcery dot com
2009-06-11 14:06 ` ramana at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: joseph at codesourcery dot com @ 2009-05-29 10:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from joseph at codesourcery dot com 2009-05-29 10:06 -------
Subject: Re: New: Using the -V option makes the compiler to
exit with 0 exit code on error
The pexecute interface returns a status value from waitpid from the driver
executed with -V, and gcc.c then passes this to exit () without passing it
through WEXITSTATUS or similar first, so it calls exit (256) which loses
the error.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40251
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug driver/40251] Using the -V option makes the compiler to exit with 0 exit code on error
2009-05-26 6:38 [Bug c/40251] New: Using the -V option makes the compiler to exit with 0 exit code on error zoltan at bendor dot com dot au
2009-05-29 2:49 ` [Bug driver/40251] " pinskia at gcc dot gnu dot org
2009-05-29 10:06 ` joseph at codesourcery dot com
@ 2009-06-11 14:06 ` ramana at gcc dot gnu dot org
2010-05-22 17:54 ` jsm28 at gcc dot gnu dot org
2010-07-24 16:09 ` jsm28 at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-06-11 14:06 UTC (permalink / raw)
To: gcc-bugs
--
ramana at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-06-11 14:06:00
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40251
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug driver/40251] Using the -V option makes the compiler to exit with 0 exit code on error
2009-05-26 6:38 [Bug c/40251] New: Using the -V option makes the compiler to exit with 0 exit code on error zoltan at bendor dot com dot au
` (2 preceding siblings ...)
2009-06-11 14:06 ` ramana at gcc dot gnu dot org
@ 2010-05-22 17:54 ` jsm28 at gcc dot gnu dot org
2010-07-24 16:09 ` jsm28 at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2010-05-22 17:54 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 767 bytes --]
------- Comment #3 from jsm28 at gcc dot gnu dot org 2010-05-22 17:54 -------
-b and -V were removed:
2010-04-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 42485
* doc/invoke.texi (-b,-V): Delete.
* doc/tm.texi: Do not mention -b.
* gcc.c (display_help): Delete -b and -V.
(process_command): Delete -b and -V.
* gcc.h (DEFAULT_SWITCH_TAKES_ARG): Delete -b and -V.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40251
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug driver/40251] Using the -V option makes the compiler to exit with 0 exit code on error
2009-05-26 6:38 [Bug c/40251] New: Using the -V option makes the compiler to exit with 0 exit code on error zoltan at bendor dot com dot au
` (3 preceding siblings ...)
2010-05-22 17:54 ` jsm28 at gcc dot gnu dot org
@ 2010-07-24 16:09 ` jsm28 at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2010-07-24 16:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jsm28 at gcc dot gnu dot org 2010-07-24 16:09 -------
*** Bug 44990 has been marked as a duplicate of this bug. ***
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |parviz_fariborz at mentor
| |dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40251
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-07-24 16:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-26 6:38 [Bug c/40251] New: Using the -V option makes the compiler to exit with 0 exit code on error zoltan at bendor dot com dot au
2009-05-29 2:49 ` [Bug driver/40251] " pinskia at gcc dot gnu dot org
2009-05-29 10:06 ` joseph at codesourcery dot com
2009-06-11 14:06 ` ramana at gcc dot gnu dot org
2010-05-22 17:54 ` jsm28 at gcc dot gnu dot org
2010-07-24 16:09 ` jsm28 at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).