http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46037
--- Comment #14 from Jan Hubicka <hubicka at ucw dot cz> 2011-01-11 09:12:05
UTC ---
> /Users/howarth/darwin_objdir/./prev-gcc/xgcc
> -B/Users/howarth/darwin_objdir/./prev-gcc/
> -B/Users/howarth/dist/x86_64-apple-darwin10.6.0/bin/
> -B/Users/howarth/dist/x86_64-apple-darwin10.6.0/bin/
> -B/Users/howarth/dist/x86_64-apple-darwin10.6.0/lib/ -isystem
> /Users/howarth/dist/x86_64-apple-darwin10.6.0/include -isystem
> /Users/howarth/dist/x86_64-apple-darwin10.6.0/sys-include
> -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include
> -I../../gcc/libcpp/include
> -I/sw/include -g -O2 -mdynamic-no-pic -gtoggle -W -Wall -Wwrite-strings
> -Wmissing-format-attribute -Wstrict-prototypes -Wmissing-prototypes
> -Wold-style-definition -Wc++-compat -pedantic -Wno-long-long -Werror
> -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include
> -I../../gcc/libcpp/include
> -I/sw/include -c -o charset.o -MT charset.o -MMD -MP -MF .deps/charset.Tpo
> ../../gcc/libcpp/charset.c
> ../../gcc/libcpp/charset.c:1:0: error: variable tracking requested, but
> useless
> unless producing debug info [-Werror]
> cc1: all warnings being treated as errors
I guess it is because of
if (flag_gtoggle)
{
if (debug_info_level == DINFO_LEVEL_NONE)
{
debug_info_level = DINFO_LEVEL_NORMAL;
if (write_symbols == NO_DEBUG)
write_symbols = PREFERRED_DEBUGGING_TYPE;
}
else
debug_info_level = DINFO_LEVEL_NONE;
}
The conditinal in darwin.c tests debug_info_level.
I guess either this test could be moved earlier in the queue or darwin.c needs
to test
gtoggle and adjust debug_info_level accrodingly.
I am really not expert in this area.
Joseph might know.
Honza