Bug 4720 - GNAT programs do not support --help and --version
Summary: GNAT programs do not support --help and --version
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 3.1
: P3 normal
Target Milestone: 4.3.0
Assignee: Geert Bosch
URL:
Keywords: documentation
Depends on:
Blocks: 704
  Show dependency treegraph
 
Reported: 2001-10-28 10:56 UTC by Joseph S. Myers
Modified: 2007-08-31 10:32 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: *-*-*
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2006-02-02 13:45:01


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph S. Myers 2001-10-28 10:56:00 UTC
The various gnat* programs now included in GCC do not support the
--help and --version options, which the GNU Coding Standards say they
should.

Release:
3.1 20011027 (experimental)

Environment:
System: Linux digraph 2.2.19 #1 Sun Oct 21 10:19:10 UTC 2001 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-cvs/configure --prefix=/opt/gcc/mainline --disable-shared --enable-threads=posix --with-system-zlib

How-To-Repeat:

gnatbind --version (for example)
Comment 1 Joseph S. Myers 2001-10-28 10:56:00 UTC
Fix:

Make all these programs support --help and --version, with the output
as described by the GNU Coding Standards (including how both the GNAT
and GCC version numbers can be included in the output).
Comment 2 Dara Hazeghi 2003-05-25 05:59:22 UTC
Hello,

this problem is still present on all gcc branches.

Dara
Comment 3 Dara Hazeghi 2003-07-06 02:10:40 UTC
Any idea who to contact about this? I thought we required documentation for all components of 
gcc, and I certainly don't see why Ada should be different.
Comment 4 Joseph S. Myers 2003-07-06 16:56:35 UTC
Subject: Re:  GNAT programs do not support --help and --version

On Sun, 6 Jul 2003, dhazeghi at yahoo dot com wrote:

> Any idea who to contact about this? I thought we required documentation
> for all components of gcc, and I certainly don't see why Ada should be
> different.

It's the Ada maintainers who should be dealing with this.  It isn't a
GCC-specific requirement here; supporting --help and --version is a
requirement of the GNU Coding Standards, so all GNU programs should
support them with output in the correct format.

Comment 5 berndtrog 2003-11-13 19:26:48 UTC
(In reply to comment #4)
> GCC-specific requirement here; supporting --help and --version is a
> requirement of the GNU Coding Standards, so all GNU programs should
> support them with output in the correct format.
..and the correct channel(std) - not stderr. So you could use '|less' to read 
the help screen, which you get *twice* if you enter 'gnatmake -h', BTW.


Comment 6 Arnaud Charlet 2007-08-31 10:19:37 UTC
Subject: Bug 4720

Author: charlet
Date: Fri Aug 31 10:19:18 2007
New Revision: 127967

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127967
Log:
2007-08-30  Vincent Celier  <celier@adacore.com>

	PR ada/4720

	* gnatchop.adb, gnatfind.adb, gnatlink.adb, gnatls.adb, 
	gnatname.adb, gnatxref.adb, gprep.adb, clean.adb gnatbind.adb
	(Check_Version_And_Help): New procedure in package Switch to process
	switches --version and --help.
	Use Check_Version_And_Help in GNAT tools

	* make.adb:  Ditto.
	(Compile_Sources): Make sure that sources that are "excluded" are not
	compiled.
	(Gnatmake): Do not issue -aO. to gnatbind and only issue -I- if a
	project file is used.
	(Version_Switch): Remove, moved to Switch
	(Help_Switch): Remove, moved to Switch
	(Display_Version): Remove, moved to Switch

	* switch.ads, switch.adb (Check_Version_And_Help): New procedure in
	package Switch to process switches --version and --help.
	(Display_Version): New procedure

	* gnatvsn.ads, gnatvsn.adb (Copyright_Holder): New function.


Modified:
    trunk/gcc/ada/clean.adb
    trunk/gcc/ada/gnatbind.adb
    trunk/gcc/ada/gnatchop.adb
    trunk/gcc/ada/gnatfind.adb
    trunk/gcc/ada/gnatlink.adb
    trunk/gcc/ada/gnatls.adb
    trunk/gcc/ada/gnatname.adb
    trunk/gcc/ada/gnatvsn.adb
    trunk/gcc/ada/gnatvsn.ads
    trunk/gcc/ada/gnatxref.adb
    trunk/gcc/ada/gprep.adb
    trunk/gcc/ada/make.adb
    trunk/gcc/ada/switch.adb
    trunk/gcc/ada/switch.ads

Comment 7 Arnaud Charlet 2007-08-31 10:32:56 UTC
This is now fixed.