diff options
author | Lewis Hyatt <lhyatt@gmail.com> | 2022-11-01 18:43:10 -0400 |
---|---|---|
committer | Lewis Hyatt <lhyatt@gmail.com> | 2022-11-15 10:50:23 -0500 |
commit | 15d315553faafeac849522792b465e522c9d665b (patch) | |
tree | b8764f475372f44fc50b07607ad3d5075e5f7c8e /gcc/function.cc | |
parent | 6238cc20f0e588f272569230b33458fedf755ab2 (diff) | |
download | gcc-15d315553faafeac849522792b465e522c9d665b.zip gcc-15d315553faafeac849522792b465e522c9d665b.tar.gz gcc-15d315553faafeac849522792b465e522c9d665b.tar.bz2 |
diagnostics: Use an inline function rather than hardcoding <built-in> string
The string "<built-in>" is hard-coded in several places throughout the
diagnostics code, and in some of those places, it is used incorrectly with
respect to internationalization. (Comparing a translated string to an
untranslated string.) The error is not currently observable in any output GCC
actually produces, hence no testcase added here, but it's worth fixing, and
also, I am shortly going to add a new such string and want to avoid hardcoding
that one in similar places.
gcc/c-family/ChangeLog:
* c-opts.cc (c_finish_options): Use special_fname_builtin () rather
than a hard-coded string.
gcc/ChangeLog:
* diagnostic.cc (diagnostic_get_location_text): Use
special_fname_builtin () rather than a hardcoded string (which was
also incorrectly left untranslated previously.)
* input.cc (special_fname_builtin): New function.
(expand_location_1): Use special_fname_builtin () rather than a
hard-coded string.
(test_builtins): Likewise.
* input.h (special_fname_builtin): Declare.
gcc/fortran/ChangeLog:
* cpp.cc (gfc_cpp_init): Use special_fname_builtin () rather than a
hardcoded string (which was also incorrectly left untranslated
previously.)
* error.cc (gfc_diagnostic_build_locus_prefix): Likewise.
* f95-lang.cc (gfc_init): Likewise.
Diffstat (limited to 'gcc/function.cc')
0 files changed, 0 insertions, 0 deletions