Re: [PATCH] clean(final.cc): Remove unused static variables.

Jeffrey Law <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>

On 8/17/2026 8:55 PM, Léo Hardt wrote:
> Good evening,
>
> This patch removes the following static variables from 'final.cc':
>   override_filename, override_linenum,
>   override_columnnum, override_discriminator
>
> You will note by browsing the trunk's code that override_filename is
> never set, and therefore the only usage of those variables is never
> triggered. They can therefore be safely removed.
>
> For context, they were added in [1,2] to track code location for
> some inline functions. It's the same patch which implemented
> tree_nonartificial_location. These variables specifically were only
> needed for DBX debugging info. Notice that their last (non-null) use
> was removed on 7e0db0cdf (2022), when -gstabs and -gxcoff functionality
> were removed.
>
> I have successfully bootstrapped the compiler with the changes below.
>
> [1] Commit in which override_filename was added: d752cfdb, Sep 2007
> https://gcc.gnu.org/pipermail/gcc-patches/2007-August/224337.html
>
> [2] Commit in which override_columnnum was added: 497b7c47, Feb 2017
> https://gcc.gnu.org/pipermail/gcc-patches/2017-February/469644.html
> referencing patch 
> https://gcc.gnu.org/pipermail/gcc-patches/2017-February/469643.html
>
> gcc/ChangeLog:
>
>     * final.cc (notice_source_line): Remove dead condition
>     for override_filename.
THanks.  I did a bootstrap test  on x86_64 for sanity testing and pushed 
this to the trunk.

jeff
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.