[Ada] Argument_String_To_List creates empty items from whitespace
authorJustin Squirek <squirek@adacore.com>
Tue, 17 Jul 2018 08:07:42 +0000 (08:07 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 17 Jul 2018 08:07:42 +0000 (08:07 +0000)
commit1b72a5637c0de2ee26e9be0e1a0615c8dc655187
treeed500224e3e44789cd31fa4a2dd3ff2cb473f860
parente6bc029a34598dd3af5c6a0aacd66ee62235cdfe
[Ada] Argument_String_To_List creates empty items from whitespace

This patch corrects an issue whereby leading whitespace in a non-quoted
argument list passed to Argument_String_To_List caused extraneous empty
arguments to be returned.

2018-07-17  Justin Squirek  <squirek@adacore.com>

gcc/ada/

* libgnat/s-os_lib.adb (Argument_String_To_List): Fix trimming of
whitespace.

gcc/testsuite/

* gnat.dg/split_args.adb: New testcase.

From-SVN: r262783
gcc/ada/ChangeLog
gcc/ada/libgnat/s-os_lib.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/split_args.adb [new file with mode: 0644]