Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#35641 - [gcc] 4.8 discards filename information in errors/backtraces

Attached to Project: Arch Linux
Opened by Dave Reisner (falconindy) - Tuesday, 04 June 2013, 15:06 GMT
Last edited by Allan McRae (Allan) - Wednesday, 26 June 2013, 04:25 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

As of gcc 4.8, compile errors and debug information is mangled.

Example with gcc 4.7:

$ make
make --no-print-directory all-am
CC src/pkgfile-pkgfile.o
src/pkgfile.c: In function ‘load_repo’:
src/pkgfile.c:336:17: error: expected expression before ‘{’ token
make[1]: *** [src/pkgfile-pkgfile.o] Error 1
make: *** [all] Error 2

Same compile error with gcc 4.8:

$ make
make --no-print-directory all-am
CC src/pkgfile-match.o
CC src/pkgfile-pkgfile.o
<command-line>: In function ‘load_repo’:
<command-line>:336:3: error: expected ‘;’ before ‘read_buffer’
make[1]: *** [src/pkgfile-pkgfile.o] Error 1
make: *** [all] Error 2

And gdb misses out on the filename info as well:

...snipped...
Temporary breakpoint 1, main (argc=1, argv=0x7fffffffdf68) at <command-line>:620
620 <command-line>: No such file or directory.
This task depends upon

Closed by  Allan McRae (Allan)
Wednesday, 26 June 2013, 04:25 GMT
Reason for closing:  Upstream
Additional comments about closing:  Fix making its way upstream. I'm not rebuilding gcc just for this...
Comment by Allan McRae (Allan) - Tuesday, 18 June 2013, 06:18 GMT
Tracked this down to the "-imacros" flag. Even including a blank file with that causes the filename information to be lost.
Comment by Allan McRae (Allan) - Tuesday, 18 June 2013, 12:06 GMT
gcc-4.8-20121028 BAD
gcc-4.8-20121021 GOOD
Comment by Allan McRae (Allan) - Wednesday, 19 June 2013, 14:08 GMT Comment by Allan McRae (Allan) - Wednesday, 19 June 2013, 14:16 GMT

Loading...