This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/71358] GNAT.Command_Line.Getopt fails if there are no switches
- From: "pmderodat at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 18 Sep 2017 08:44:08 +0000
- Subject: [Bug ada/71358] GNAT.Command_Line.Getopt fails if there are no switches
- Auto-submitted: auto-generated
- References: <bug-71358-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71358
--- Comment #6 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Mon Sep 18 08:43:37 2017
New Revision: 252909
URL: https://gcc.gnu.org/viewcvs?rev=252909&root=gcc&view=rev
Log:
2017-09-18 Bob Duff <duff@adacore.com>
Alternate fix for PR ada/71358
* libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
Instead, make a local copy of Config, and if it's null, allocate an
empty Command_Line_Configuration_Record, so we won't crash on null
pointer dereference.
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/libgnat/g-comlin.adb