public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/63782] New: avoid implicit declaration warning for incompatible builtin implicit declaration
@ 2014-11-08 20:41 manu at gcc dot gnu.org
  2014-11-09 18:33 ` [Bug c/63782] " mpolacek at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: manu at gcc dot gnu.org @ 2014-11-08 20:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63782

            Bug ID: 63782
           Summary: avoid implicit declaration warning for incompatible
                    builtin implicit declaration
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: manu at gcc dot gnu.org

void foo(char *str) {
  strcpy(str, "foo");
}

[t@ws-520 examples]$ clang-3.5 -c -Wall test.c
test.c:2:3: warning: implicitly declaring library function 'strcpy' with
type 'char *(char *, const char *)'
strcpy(str, "foo");
^
test.c:2:3: note: include the header <string.h> or explicitly provide a
declaration for 'strcpy'
1 warning generated.

$ gcc-5 -c -Wall test.c
test.c: In function ‘foo’:
test.c:2:3: warning: implicit declaration of function ‘strcpy’
[-Wimplicit-function-declaration]
   strcpy(str, "foo");
   ^
test.c:2:3: warning: incompatible implicit declaration of built-in function
‘strcpy’
test.c:2:3: note: include ‘<string.h>’ or provide a declaration of ‘strcpy’

The first warning is superfluous if the second is given.

(from a talk by Samsung at LinuxCon Europe:
http://events.linuxfoundation.org/sites/events/files/slides/linuxcon-europe-2014-llvm.pdf)
>From gcc-bugs-return-466086-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Nov 08 20:49:21 2014
Return-Path: <gcc-bugs-return-466086-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30124 invoked by alias); 8 Nov 2014 20:49:21 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 30090 invoked by uid 48); 8 Nov 2014 20:49:18 -0000
From: "fxcoudert at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/42951] GCC pedwarns about use of static inline functions from system headers in extern inline functions
Date: Sat, 08 Nov 2014 20:49:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.4.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: fxcoudert at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-42951-4-nyIVkOkdiU@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-42951-4@http.gcc.gnu.org/bugzilla/>
References: <bug-42951-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-11/txt/msg00558.txt.bz2
Content-length: 194

https://gcc.gnu.org/bugzilla/show_bug.cgi?idB951

--- Comment #3 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
*** Bug 47816 has been marked as a duplicate of this bug. ***


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

* [Bug c/63782] avoid implicit declaration warning for incompatible builtin implicit declaration
  2014-11-08 20:41 [Bug c/63782] New: avoid implicit declaration warning for incompatible builtin implicit declaration manu at gcc dot gnu.org
@ 2014-11-09 18:33 ` mpolacek at gcc dot gnu.org
  2015-04-22 12:01 ` jakub at gcc dot gnu.org
  2015-07-16  9:19 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-11-09 18:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63782

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-11-09
                 CC|                            |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |5.0
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.


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

* [Bug c/63782] avoid implicit declaration warning for incompatible builtin implicit declaration
  2014-11-08 20:41 [Bug c/63782] New: avoid implicit declaration warning for incompatible builtin implicit declaration manu at gcc dot gnu.org
  2014-11-09 18:33 ` [Bug c/63782] " mpolacek at gcc dot gnu.org
@ 2015-04-22 12:01 ` jakub at gcc dot gnu.org
  2015-07-16  9:19 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-04-22 12:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63782

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|5.0                         |5.2

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 5.1 has been released.


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

* [Bug c/63782] avoid implicit declaration warning for incompatible builtin implicit declaration
  2014-11-08 20:41 [Bug c/63782] New: avoid implicit declaration warning for incompatible builtin implicit declaration manu at gcc dot gnu.org
  2014-11-09 18:33 ` [Bug c/63782] " mpolacek at gcc dot gnu.org
  2015-04-22 12:01 ` jakub at gcc dot gnu.org
@ 2015-07-16  9:19 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-16  9:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63782

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|5.2                         |5.3

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 5.2 is being released, adjusting target milestone to 5.3.


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

end of thread, other threads:[~2015-07-16  9:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-08 20:41 [Bug c/63782] New: avoid implicit declaration warning for incompatible builtin implicit declaration manu at gcc dot gnu.org
2014-11-09 18:33 ` [Bug c/63782] " mpolacek at gcc dot gnu.org
2015-04-22 12:01 ` jakub at gcc dot gnu.org
2015-07-16  9:19 ` rguenth at gcc dot gnu.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).