This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb fails to compile with GCC 4.4.7 (was: [PATCH V4 5/9] New probe type: DTrace USDT probes.)


Hi all,

I think this patch (commit 429e1e811b400f07b5a514ea6b8a70b28e2d7ee9) causes
gdb's compilation to fail with GCC 4.4.7 (RHEL 6 system compiler) as follows;
it does work with GCC 5.

cc1: warnings being treated as errors
../../gdb/dtrace-probe.c: In function âdtrace_process_dof_probeâ:
../../gdb/dtrace-probe.c:416: error: âexprâ may be used uninitialized in this function
make[2]: *** [dtrace-probe.o] Error 1


I think that looks spurious as the code looks fine (i.e. GCC is overzaelous), still,
a "= NULL" should harm.

Tobias


   414          {
   415            struct dtrace_probe_arg arg;
   416            struct expression *expr;
...
   431            TRY
   432              {
   433                expr = parse_expression_with_language (arg.type_str, language_c);
   434              }
   435            CATCH (ex, RETURN_MASK_ERROR)
   436              {
   437                expr = NULL;
   438              }
   439            END_CATCH
   440
   441            if (expr != NULL && expr->elts[0].opcode == OP_TYPE)
   442              arg.type = expr->elts[1].type;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]