Static analysis needs good location info in order to present useful errors.
Unfortunately in GIMPLE when you have a statement like
func( x ); There is no way to get a location for x and often it's hard to get a
location for func(ie if func takes form of some_namespace::func ( x )). 
In Mozilla, we work around this by walking the expression stack backwards and
hope that an expression containing a reference to a variable has a location
that's sufficiently close to the variable. Other C/C++ frontends indicate the
coordinates of variable uses, not just declarations.


-- 
           Summary: Preserve variable-use locations
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tglek at mozilla dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43486

Reply via email to