8sa1-binutils-gdb/gdb/compile
Sergio Durigan Junior 7d937cad0a Fix warning on gdb/compile/compile.c (C++-ify "triplet_rx")
This fixes a GCC warning that happens when compiling
gdb/compile/compile.c on some GCC versions (e.g., "gcc (GCC) 7.2.1
20180104 (Red Hat 7.2.1-6)"):

../../gdb/compile/compile.c: In function 'void eval_compile_command(command_line*, const char*, compile_i_scope_types, void*)':
../../gdb/compile/compile.c:548:19: warning: 'triplet_rx' may be used uninitialized in this function [-Wmaybe-uninitialized]
     error_message = compiler->fe->ops->set_arguments_v0 (compiler->fe, triplet_rx,
     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         argc, argv);
         ~~~~~~~~~~~
../../gdb/compile/compile.c:466:9: note: 'triplet_rx' was declared here
   char *triplet_rx;
         ^~~~~~~~~~

It's a simple patch that converts "triplet_rx" from "char *" to
"std::string", thus guaranteeing that it will be always initialized.

I've regtested this patch and did not find any regressions.  OK to
apply on both master and 8.1 (after creating a bug for it)?

gdb/ChangeLog:
2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>

	* compile/compile.c (compile_to_object): Convert "triplet_rx"
	to "std::string".
2018-01-17 18:05:42 -05:00
..
compile-c-support.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
compile-c-symbols.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
compile-c-types.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
compile-internal.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
compile-loc2c.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
compile-object-load.c Fix regresssion(internal-error) printing subprogram argument (PR gdb/22670) 2018-01-05 16:07:00 +00:00
compile-object-load.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
compile-object-run.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
compile-object-run.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
compile.c Fix warning on gdb/compile/compile.c (C++-ify "triplet_rx") 2018-01-17 18:05:42 -05:00
compile.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00