Bug 167148

Summary: inconsistent DW_AT_encoding value for "char"
Product: [Fedora] Fedora Reporter: Roland McGrath <roland>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: graydon
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 4.0.1-13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-01 14:07:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roland McGrath 2005-08-31 00:47:05 UTC
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):
gcc-4.0.1-4.fc4

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 12:37:29 UTC
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 14:07:17 UTC
http://gcc.gnu.org/ml/gcc-patches/2005-09/msg00026.html
Will hit next gcc-4.0.1 rpms, already fixed in our gcc-3.4.*.

Comment 3 Jakub Jelinek 2005-09-07 16:34:11 UTC
Fixed in 4.0.1-13.