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

Bug#584511: gcc-4.4: gcc should not warn about glibc-2.7 scanf features



Package: gcc-4.4
Version: 4.4.4-1
Severity: normal

Hi,

Citing the sscanf manpage:
"The  GNU  C library supports a nonstandard extension that causes the library
 to dynamically allocate a string of sufficient size for input strings for
 the %s and %a[range] conversion specifiers.  To make use of this feature,
 specify a as a length modifier (thus %as or %a[range]).  The caller must
 free(3) the returned string[...]
 Since version 2.7, glibc also provides the m modifier for the same purpose
 as the a modifier.  The m modifier has the following advantages:
 * It may also be applied to %c conversion specifiers (e.g., %3mc).
 * It avoids ambiguity with respect to the %a floating-point conversion
   specifier (and is unaffected by gcc -std=c99 etc.)
 * It is specified in the upcoming revision of the POSIX.1 standard."

However, gcc -Wformat tells me:
error: ISO C does not support the 'm' scanf flag

BUT: it obviously knows what the 'm' scanf flag means because it warn when
providing a char* instead of a char**.

GCC should be updated to have -Wformat support the 'm' flag (the supported
glibc-2.2 feature base is really old).


HS

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

Kernel: Linux 2.6.34-rc7-00154-g18e41da (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gcc-4.4 depends on:
ii  binutils                      2.20.1-9   The GNU assembler, linker and bina
ii  cpp-4.4                       4.4.4-1    The GNU C preprocessor
ii  gcc-4.4-base                  4.4.4-1    The GNU Compiler Collection (base 
ii  libc6                         2.10.2-9   Embedded GNU C Library: Shared lib
ii  libgcc1                       1:4.5.0-1  GCC support library
ii  libgomp1                      4.5.0-1    GCC OpenMP (GOMP) support library

Versions of packages gcc-4.4 recommends:
ii  libc6-dev                     2.10.2-9   Embedded GNU C Library: Developmen

Versions of packages gcc-4.4 suggests:
pn  gcc-4.4-doc                   <none>     (no description available)
pn  gcc-4.4-locales               <none>     (no description available)
ii  gcc-4.4-multilib              4.4.4-1    The GNU C compiler (multilib files
ii  libcloog-ppl0                 0.15.9-1   the Chunky Loop Generator (runtime
pn  libgcc1-dbg                   <none>     (no description available)
pn  libgomp1-dbg                  <none>     (no description available)
pn  libmudflap0-4.4-dev           <none>     (no description available)
pn  libmudflap0-dbg               <none>     (no description available)
ii  libppl-c2                     0.10.2-6   Parma Polyhedra Library (C interfa
ii  libppl7                       0.10.2-6   Parma Polyhedra Library (runtime l

-- no debconf information



Reply to: