c++/9367: error: nonnull argument with extern "C" snprintf prototype
levon@movementarian.org
levon@movementarian.org
Sun Jan 19 17:51:00 GMT 2003
>Number: 9367
>Category: c++
>Synopsis: error: nonnull argument with extern "C" snprintf prototype
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Sun Jan 19 17:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: levon@movementarian.org
>Release: GCC 3.4 CVS Head
>Organization:
>Environment:
Linux lambent 2.4.20 #5 Wed Jan 8 15:33:24 GMT 2003 i686 i686 i386 GNU/Linux
>Description:
The following code :
extern "C" int snprintf();
when compiled with g++ from CVS head, gives :
a.c:1: error: nonnull argument with out-of-range operand number (arg 1, operand
3)
Joseph Myers :
"It appears that handle_nonnull_attribute fails to check for
ATTR_FLAG_BUILT_IN in its flags argument. This is used for the built-in
format attributes specifically to avoid that problem."
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list