This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Is language_lookup_primitive_type_by_name needed?
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb at sources dot redhat dot com
- Date: Tue, 03 Aug 2004 18:26:26 -0400
- Subject: Is language_lookup_primitive_type_by_name needed?
If you look at language_lookup_primitive_type_by_name it appears to do a
simple name -> type lookup based on the language. Where name is
something like "double", "float", ...
Looking at c-exp.y:yylex, though, it doesn't appear to be useful. The
problem is that earlier code vis:
case 6:
if (strncmp (tokstart, "struct", 6) == 0)
return STRUCT;
if (strncmp (tokstart, "signed", 6) == 0)
return SIGNED_KEYWORD;
if (strncmp (tokstart, "sizeof", 6) == 0)
return SIZEOF;
if (strncmp (tokstart, "double", 6) == 0)
return DOUBLE_KEYWORD;
break;
will have already identified those types and exited the routine.
language_lookup_primitive_type_by_name only being called for types it
doesn't know about.
Was this doing something else that was later lost?
Is the same true for other languages?
- f-exp.y appears to use f77_keywords
- objc-exp.y looks like C
- p-exp.y might do something with it, but I can't remember enough pascal
- ada-exp.l, I'm not sure
ideas?
Deleting it greatly simplifies multi-arch.
Andrew