public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/16833] New: -fno-builtin prevents automatic format checks for standard functions
@ 2004-07-30 12:34 timb at bluearc dot com
  2004-07-30 15:39 ` [Bug c/16833] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: timb at bluearc dot com @ 2004-07-30 12:34 UTC (permalink / raw)
  To: gcc-bugs

The documentation for the format function attribute says: "The compiler always
(unless -ffreestanding is used) checks formats for the standard library
functions ... whenever such warnings are requested". However, these implicit
attributes appear to be disabled also by -fno-builtin (which is implied by
-ffreestanding).

At the very least, the docs and the actual behaviour should match; but I think
the current behaviour is incorrect, as without -ffreestanding it is still a
hosted implementation, so printf etc. should be assumed to be standard.

Test case: compile this code with -Wformat and with/without -fno-builtin:

int printf(const char* format, ...);
void foo(void)
{
    printf("%s");
}

-- 
           Summary: -fno-builtin prevents automatic format checks for
                    standard functions
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: timb at bluearc dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i486-linux
  GCC host triplet: i486-linux
GCC target triplet: i486-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16833


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-09-23 16:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-30 12:34 [Bug c/16833] New: -fno-builtin prevents automatic format checks for standard functions timb at bluearc dot com
2004-07-30 15:39 ` [Bug c/16833] " pinskia at gcc dot gnu dot org
2004-07-30 15:56 ` timb at bluearc dot com
2004-07-30 19:04 ` pinskia at gcc dot gnu dot org
2004-07-31 22:30 ` jsm at polyomino dot org dot uk
2004-09-23 16:11 ` cvs-commit at gcc dot gnu dot org
2004-09-23 16:35 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).