https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110003

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Gaius Mulley <ga...@gcc.gnu.org>:

https://gcc.gnu.org/g:7c0e2159afb3235950d3d8f61ef085cd1ccf0dfc

commit r14-1520-g7c0e2159afb3235950d3d8f61ef085cd1ccf0dfc
Author: Gaius Mulley <gaiusm...@gmail.com>
Date:   Sat Jun 3 15:27:58 2023 +0100

    PR modula2/110003 Wrong source line listed for unused parameters

    Ensure that the parameter token position is recorded for both
    definition and implementation modules.  The shadow variable
    is created inside BuildFormalParameterSection.  The shadow
    variable needs to have the other definition or implementation module
    token position set when CheckFormalParameterSection is called.
    This allows the MetaError family of procedures to request the
    implementation module token position when reporting unused parameters.

    gcc/m2/ChangeLog:

            PR modula2/110003
            * gm2-compiler/P2SymBuild.mod (GetParameterShadowVar): Import.
            (CheckFormalParameterSection): Call PutDeclared for the shadow
            variable associated with the parameter.

    Signed-off-by: Gaius Mulley <gaiusm...@gmail.com>

Reply via email to