[Bug ada/71358] GNAT.Command_Line.Getopt fails if there are no switches
pmderodat at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Sep 18 08:44:00 GMT 2017
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
More information about the Gcc-bugs
mailing list