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] coffread.c: delete param



Given Andrew's comment in the code, I would be rather wary of this
patch.  Presumably there is some good reason for passing the
cs->c_sclass field in the (void *) pointer argument slot, or otherwise
Andrew would not have gone to all that trouble of casting it.

No. I went to the trouble of casing it so that it got past GCC -Werror.


Andrew


-
- 		/* FIXME: cagney/2001-02-01: The nasty (int) -> (long)
-                   -> (void*) cast is to ensure that that the value of
-                   cs->c_sclass can be correctly stored in a void
-                   pointer in MSYMBOL_INFO.  Better solutions
-                   welcome. */
-		gdb_assert (sizeof (void *) >= sizeof (cs->c_sclass));
 		msym = prim_record_minimal_symbol_and_info
-		  (cs->c_name, tmpaddr, ms_type, (void *) (long) cs->c_sclass,
+		  (cs->c_name, tmpaddr, ms_type, NULL,
 		   sec, NULL, objfile);



[Richard, Nick, this does affect arm-coff]


Does it improve things ? :-) If so, what ?

Cheers
Nick






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