------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-12-21 21:06 ------- This is not very easy to fix.
The first warning comes from the parser, during name-lookup, when it realizes that the name resolves to a deprecated function. The second warning comes after overload resolution, when we select a function to call. If func was really overloaded, then the parser would not warn, so we need the warning after overload resolution. However, if the function is never called, we want the warning from the parser. Because the FUNCTION_DECL is doubling as a node in the expression tree, we can't mark it as "warning issued" without losing any subsequent warnings about other uses. Joseph and I both agree that we really want some kind of separate parser-expression structure to use for exactly this kind of thing, but we haven't got it yet. This is not a high-priority item, so I'm downgrading it to P3. I'm also removing the target milestone, despite being a regression, as this is a minor annoyance, and would never block a release. -- What |Removed |Added ---------------------------------------------------------------------------- Priority|P2 |P3 Target Milestone|3.4.4 |--- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17729