[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#941911: marked as done (g++: Broken -x/suffix handling leads to spurious -Wc++-compat warnings)



Your message dated Sat, 13 Feb 2021 13:07:12 +0000
with message-id <[🔎] E1lAudk-0000FN-1x@fasolo.debian.org>
and subject line Bug#954831: Removed package(s) from unstable
has caused the Debian Bug report #941911,
regarding g++: Broken -x/suffix handling leads to spurious -Wc++-compat warnings
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
941911: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=941911
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: g++-8
Version: 8.3.0-6
Severity: normal

Dear Maintainer,

I noticed a bug in handling -Wc++-compat when (not) using the -x option.
Suppose you have two files containing valid C saved in files a.c and b.c,
for example, "int main(void) {}" in a.c and just a newline in b.c.

According to the documentation AFAICT you should be able to compile this
without errors in a single step by executing
        g++ -Wc++-compat a.c b.c
since the correct language of the file should be determined automatically by
the suffix.

However, this leads to two times
        cc1plus: warning: command line option ‘-Wc++-compat’ is valid for
C/ObjC but not for C++

One should be able to remove the warnings by forcing the language used to C
by prepending "-x c" as in
        g++ -Wc++-compat -x c a.c b.c
since the manual states that -x <lang> "applies to all following input files
until the next -x option".

However, this is not the case because only the first spurious warning is fixed
by this and ony adding another -x c just before the second file, i.e.,
        g++ -Wc++-compat -x c a.c -x c b.c
works as expected without any warnings.

This problem is not depending on any arch specifics (tested with native g++
8.3.0
on amd64, and cross compilers for riscv64-linux-gnu, and arm-linux-gnueabihf).
A quick test with g++ 6.3.0-18+deb9u1 on amd64 revealed the same behavior.

I did not (and do not intend to but could if need be) report this upstream.

KR, Stefan



-- System Information:
Debian Release: 10.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (91, 'testing'), (10, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-6-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages g++-8 depends on:
ii  gcc-8            8.3.0-6
ii  gcc-8-base       8.3.0-6
ii  libc6            2.28-10
ii  libgmp10         2:6.1.2+dfsg-4
ii  libisl19         0.20-2
ii  libmpc3          1.1.0-1
ii  libmpfr6         4.0.2-1
ii  libstdc++-8-dev  8.3.0-6
ii  zlib1g           1:1.2.11.dfsg-1

g++-8 recommends no packages.

Versions of packages g++-8 suggests:
pn  g++-8-multilib    <none>
ii  gcc-8-doc         8.3.0-1~bpo10+1
pn  libstdc++6-8-dbg  <none>

-- no debconf information

--- End Message ---
--- Begin Message ---
Version: 1:8.4.0-7+rm

Dear submitter,

as the package gcc-8 has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/954831

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Joerg Jaspert (the ftpmaster behind the curtain)

--- End Message ---

Reply to: