mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-25 19:14:52 +08:00
* c-valprint.c (c_value_print): Check for plain literal `char'
target type when suppressing `(char *)' output for strings.
This commit is contained in:
parent
e574ddd43a
commit
c50e36c288
@ -1,3 +1,8 @@
|
||||
Tue Nov 1 13:00:46 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||
|
||||
* c-valprint.c (c_value_print): Check for plain literal `char'
|
||||
target type when suppressing `(char *)' output for strings.
|
||||
|
||||
Mon Oct 31 19:19:51 1994 Stan Shebs (shebs@andros.cygnus.com)
|
||||
|
||||
* coffread.c (coff_symfile_init): Remove unused local abfd.
|
||||
|
@ -494,9 +494,9 @@ c_value_print (val, stream, format, pretty)
|
||||
/* Hack: remove (char *) for char strings. Their
|
||||
type is indicated by the quoted string anyway. */
|
||||
if (TYPE_CODE (type) == TYPE_CODE_PTR &&
|
||||
TYPE_LENGTH (TYPE_TARGET_TYPE (type)) == sizeof(char) &&
|
||||
TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_INT &&
|
||||
!TYPE_UNSIGNED (TYPE_TARGET_TYPE (type)))
|
||||
TYPE_NAME (type) == NULL &&
|
||||
TYPE_NAME (TYPE_TARGET_TYPE (type)) != NULL &&
|
||||
STREQ (TYPE_NAME (TYPE_TARGET_TYPE (type)), "char"))
|
||||
{
|
||||
/* Print nothing */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user