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

Bug#539912: marked as done (gcc-*: for c99, POSIX requires that option -D have a lower precedence than -U)



Your message dated Tue, 28 Dec 2021 08:50:27 +0000
with message-id <CA+p-4PS3pZONSeS_J-ujuCUPzRrfXBZ=c2e8QW0azi3PuvBp3A@mail.gmail.com>
and subject line Very Important
has caused the Debian Bug report #539912,
regarding gcc-*: for c99, POSIX requires that option -D have a lower precedence than -U
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.)


-- 
539912: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=539912
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: gcc-4.3
Version: 4.3.3-15
Severity: normal

Note: this is a bug concerning the c99 utility, but since c99 uses
gcc, I report the bug against gcc. Also note that both gcc-4.4 and
gcc-snapshot have the same problem. I've also reported the bug on
GCC's bugzilla: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40960

In http://www.opengroup.org/onlinepubs/9699919799/utilities/c99.html
POSIX specifies:

  -D  name[=value]
    Define name as if by a C-language #define directive. If no = value
    is given, a value of 1 shall be used. The -D option has lower
    precedence than the -U option. That is, if name is used in both a
    -U and a -D option, name shall be undefined regardless of the
    order of the options.

However, gcc doesn't take the precedence rule into account:

$ cat tst.c
int main(void)
{
#ifdef FOO
  return 1;
#else
  return 0;
#endif
}
$ c99 tst.c -UFOO -DFOO=1
$ ./a.out
zsh: exit 1     ./a.out

whereas FOO should be undefined and the return value should be 0, not 1.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages gcc-4.3 depends on:
ii  binutils              2.19.51.20090723-1 The GNU assembler, linker and bina
ii  cpp-4.3               4.3.3-15           The GNU C preprocessor
ii  gcc-4.3-base          4.3.3-15           The GNU Compiler Collection (base 
ii  libc6                 2.9-23             GNU C Library: Shared libraries
ii  libgcc1               1:4.4.1-1          GCC support library
ii  libgomp1              4.4.1-1            GCC OpenMP (GOMP) support library

Versions of packages gcc-4.3 recommends:
ii  libc6-dev                     2.9-23     GNU C Library: Development Librari

Versions of packages gcc-4.3 suggests:
ii  gcc-4.3-doc                  4.3.2.nf1-1 documentation for the GNU compiler
pn  gcc-4.3-locales              <none>      (no description available)
pn  gcc-4.3-multilib             <none>      (no description available)
pn  libgcc1-dbg                  <none>      (no description available)
pn  libgomp1-dbg                 <none>      (no description available)
pn  libmudflap0-4.3-dev          <none>      (no description available)
pn  libmudflap0-dbg              <none>      (no description available)

-- no debconf information



--- End Message ---
--- Begin Message ---
I am Lynn NaffI' from USA. I want us to be good friends. I have some very
important things to talk to you. (lynnnaff995@gmail.com) so we can
talk more and also send my photos, I wait to hear from you

--- End Message ---

Reply to: