This is the mail archive of the gdb-patches@sources.redhat.com 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: [PATCH/RFC] Work around GCC compiler bugs in frame.c


I've always considered functions return a struct (as opposed to a
pointer to a struct) bad programming style, but now I know why.  The
following code in frame.c triggers a bug in the system compiler on
OpenBSD/vax (which is basically GCC 2.95.3 with some local patches):

      && frame_id_eq (get_frame_id (this_frame),
                      get_frame_id (this_frame->next))

Would introducing frame_eq(), frame_inner() be more robust? Either way you'll likely want to add a comment.


Andrew

(I knew that there had been a bug but no one I asked could remember or demonstrate it.).



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