Bug 167148 - inconsistent DW_AT_encoding value for "char"
inconsistent DW_AT_encoding value for "char"
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2005-08-30 20:47 EDT by Roland McGrath
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 4.0.1-13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-01 10:07:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 7241 None None None Never

  None (edit)
Description Roland McGrath 2005-08-30 20:47:05 EDT
Description of problem:

We cannot figure out whether GCC thinks C should use DW_ATE_{un,}signed_char or
DW_ATE_{un,}signed for the "char" types.  From the source code it looks like the
*_char types (CHAR_TYPE) are not used in C.  But in practice it sometimes
generates one and sometimes the other.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.echo "char a = 'x'; const char b = 'x';" | gcc -g -o char.o -c -x c - ;
eu-readelf --debug-dump=info char.o
2.echo "const char a = 'x'; char b = 'x';" | gcc -g -o char.o -c -x c - ;
eu-readelf --debug-dump=info char.o
3. Compare the base_type with name "char" in each.
Actual results:

One says "encoding             signed_char (6)".
One says "encoding             signed (5)".

Expected results:

Consistent definition of DWARF encoding for base types.

Additional info:
Comment 1 Jakub Jelinek 2005-09-01 08:37:29 EDT
Heh, unfixed bugs are going to haunt you...
I have fixed this 3 years ago, but for some reason I really don't remember now
only on gcc-3_{3,4}-rhl-branch and nowhere else.
Testing a new patch now...
Comment 2 Jakub Jelinek 2005-09-01 10:07:17 EDT
Will hit next gcc-4.0.1 rpms, already fixed in our gcc-3.4.*.
Comment 3 Jakub Jelinek 2005-09-07 12:34:11 EDT
Fixed in 4.0.1-13.

Note You need to log in before you can comment on or make changes to this bug.