aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.cc
diff options
context:
space:
mode:
authorLewis Hyatt <lhyatt@gmail.com>2022-11-01 18:43:10 -0400
committerLewis Hyatt <lhyatt@gmail.com>2022-11-15 10:50:23 -0500
commit15d315553faafeac849522792b465e522c9d665b (patch)
treeb8764f475372f44fc50b07607ad3d5075e5f7c8e /gcc/function.cc
parent6238cc20f0e588f272569230b33458fedf755ab2 (diff)
downloadgcc-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