Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 714000 - sys-devel/gcc-9.3.0 : /.../expr.c: error: format not a string literal and no format arguments [-Werror=format-security]
Summary: sys-devel/gcc-9.3.0 : /.../expr.c: error: format not a string literal and no ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: format-security
  Show dependency tree
 
Reported: 2020-03-22 14:46 UTC by Toralf Förster
Modified: 2020-03-27 12:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,15.75 KB, text/plain)
2020-03-22 14:46 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,1.25 KB, text/plain)
2020-03-22 14:46 UTC, Toralf Förster
Details
environment (environment,129.48 KB, text/plain)
2020-03-22 14:46 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,10.16 KB, application/x-bzip)
2020-03-22 14:46 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,59.32 KB, application/x-bzip)
2020-03-22 14:46 UTC, Toralf Förster
Details
sys-devel:gcc-9.3.0:20200322-135529.log (sys-devel:gcc-9.3.0:20200322-135529.log,237.92 KB, text/plain)
2020-03-22 14:46 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,47.01 KB, application/x-bzip)
2020-03-22 14:46 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-03-22 14:46:05 UTC
/var/tmp/portage/sys-devel/gcc-9.3.0/work/gcc-9.3.0/libcpp/expr.c: In function unsigned int cpp_classify_number(cpp_reader*, const cpp_token*, const char**, location_t):
/var/tmp/portage/sys-devel/gcc-9.3.0/work/gcc-9.3.0/libcpp/expr.c:797:18: error: format not a string literal and no format arguments [-Werror=format-security]
  797 |        0, message);
      |                  ^
/var/tmp/portage/sys-devel/gcc-9.3.0/work/gcc-9.3.0/libcpp/expr.c:800:39: error: format not a string literal and no format arguments [-Werror=format-security]

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_gnome-20200322-135559

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.2.0 *
Available Python interpreters, in order of preference:
  [1]   python3.7
  [2]   python3.6
  [3]   python2.7 (fallback)

timestamp of HEAD at this tinderbox image:
/var/db/repos/gentoo	Sun 22 Mar 2020 12:18:34 PM UTC

emerge -qpvO sys-devel/gcc
[ebuild  NS   ] sys-devel/gcc-9.3.0 [9.2.0-r2] USE="(cxx) fortran (multilib) nls nptl openmp pch (pie) sanitize ssp vtv (-altivec) -d -debug -doc (-fixed-point) -go -graphite (-hardened) (-jit) (-libssp) -lto -objc -objc++ -objc-gc -pgo -systemtap -test -vanilla"
Comment 1 Toralf Förster gentoo-dev 2020-03-22 14:46:08 UTC
Created attachment 624478 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-03-22 14:46:12 UTC
Created attachment 624480 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-03-22 14:46:16 UTC
Created attachment 624482 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-03-22 14:46:20 UTC
Created attachment 624484 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-03-22 14:46:26 UTC
Created attachment 624486 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-03-22 14:46:32 UTC
Created attachment 624488 [details]
sys-devel:gcc-9.3.0:20200322-135529.log
Comment 7 Toralf Förster gentoo-dev 2020-03-22 14:46:36 UTC
Created attachment 624490 [details]
temp.tbz2
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2020-03-22 15:00:11 UTC
"""
/var/tmp/portage/sys-devel/gcc-9.3.0/work/gcc-9.3.0/libcpp/expr.c: In function ‘unsigned int cpp_classify_number(cpp_reader*, const cpp_token*, const char**, location_t)’:
/var/tmp/portage/sys-devel/gcc-9.3.0/work/gcc-9.3.0/libcpp/expr.c:797:18: error: format not a string literal and no format arguments [-Werror=format-security]
  797 |        0, message);
      |                  ^
/var/tmp/portage/sys-devel/gcc-9.3.0/work/gcc-9.3.0/libcpp/expr.c:800:39: error: format not a string literal and no format arguments [-Werror=format-security]
  800 |           virtual_location, 0, message);
      |                                       ^
"""

`-Werror=format-security` is not very compatible with NLS marking:

"""
      if ((result & CPP_N_WIDTH) == CPP_N_LARGE
          && CPP_OPTION (pfile, cpp_warn_long_long))
        {
          const char *message = CPP_OPTION (pfile, cplusplus)
                                ? N_("use of C++11 long long integer constant")
                                : N_("use of C99 long long integer constant");

          if (CPP_OPTION (pfile, c99))
            cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
                                   0, message);
          else
            cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
                                      virtual_location, 0, message);
        }

      result |= CPP_N_INTEGER;
"""