Bug 167148 - inconsistent DW_AT_encoding value for "char"
Summary: inconsistent DW_AT_encoding value for "char"
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-08-31 00:47 UTC by Roland McGrath
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: 4.0.1-13
Clone Of:
Environment:
Last Closed: 2005-09-01 14:07:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 7241 0 None None None Never

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.


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