Bug 18552 - Annoying warning with -ffunction-sections -g
Summary: Annoying warning with -ffunction-sections -g
Status: RESOLVED DUPLICATE of bug 18553
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.4
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Keywords: diagnostic
Depends on:
Reported: 2004-11-18 19:40 UTC by Bernardo Innocenti
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: avr
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Bernardo Innocenti 2004-11-18 19:40:52 UTC
When building with both -ffunction-sections and
-g, the compiler outputs an invalid warning for
each compiled file:

  drv/timer.c:1: warning: -ffunction-sections may affect debugging on some targets

The code printing this is here:

--- gcc/toplev.c ---
  if (flag_function_sections && write_symbols != NO_DEBUG)
    warning ("-ffunction-sections may affect debugging on some targets");
--- gcc/toplev.c ---

A possible fix could be adding elfos.h to the tm_file
list for the avr target in config.gcc, which may also
lead to simplifications in some parts of config/avr.h.
Comment 1 Andrew Pinski 2004-11-18 20:28:07 UTC

*** This bug has been marked as a duplicate of 18553 ***