imacros command line breaks debugging information
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc |
Fix Released
|
Medium
|
|||
gcc-4.8 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
gcc-4.9 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hello,
Currently, the gcc ubuntu package has a bug that comes from upstream:
http://
The effect of the bug is if one compiles a file with the option -imacros,
the filename and all useful debugging information disappears. Here is a
simple example of that:
imacros-test$ cat somefile.c
#warning some warning
imacros-test$ cat macros.h
#define SOME_MACRO
imacros-test$ gcc -c somefile.c
somefile.c:1:2: warning: #warning some warning [-Wcpp]
#warning some warning
^
imacros-test$ gcc -c somefile.c -imacros macros.h
<command-line>:1:2: warning: #warning some warning [-Wcpp]
This also affects the debugging information embedded within the files,
rendering debugging pretty useless.
While I am aware this is a bug from upstream, it's been sitting there
for a while with a simple patch. It'd be nice to apply that patch on the
ubuntu package in the meantime.
Thanks!
ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: gcc 4:4.8.1-2ubuntu3
ProcVersionSign
Uname: Linux 3.8.0-19-generic x86_64
ApportVersion: 2.12.5-0ubuntu2.2
Architecture: amd64
Date: Mon Jan 6 05:41:13 2014
MarkForUpload: True
ProcEnviron:
TERM=screen
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: gcc-defaults
UpgradeStatus: Upgraded to saucy on 2013-10-19 (78 days ago)
affects: | gcc-defaults (Ubuntu) → gcc-4.8 (Ubuntu) |
Changed in gcc: | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
When compiling with the "-imacros" flag, the file name information is lost in error messages and backtraces.
e.g.
> gcc-4.8 -imacros i.h test.c
<command-line>: In function ‘main’:
<command-line>:5:1: error: expected ‘;’ before ‘}’ token
The problem commit is: gcc.gnu. org/git/ ?p=gcc. git;a=commitdif f;h=6adc88f8
http://