public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/13268] New: modf, modff, modfl: help GCC with argument checking
@ 2011-10-05 23:44 bruno at clisp dot org
2011-10-12 12:36 ` [Bug math/13268] " aj at suse dot de
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: bruno at clisp dot org @ 2011-10-05 23:44 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13268
Bug #: 13268
Summary: modf, modff, modfl: help GCC with argument checking
Product: glibc
Version: 2.11
Status: NEW
Severity: normal
Priority: P2
Component: math
AssignedTo: aj@suse.de
ReportedBy: bruno@clisp.org
Classification: Unclassified
The second argument of the functions modf, modff, modfl must not be a NULL
pointer, according to POSIX, and the glibc implementation also does not allow
a NULL pointer.
It would be useful to allow GCC to give a warning when someone passes a NULL
literal to these functions.
How to reproduce:
==================== foo.c ========================
#include <math.h>
#include <stddef.h>
int
main ()
{
return ! modf (2.4, NULL);
}
===================================================
$ gcc -Wall foo.c
Expected result:
foo.c: In function 'main':
foo.c:6:3: warning: null argument where non-null required (argument 2)
Actual result:
No diagnostic.
The fix should be easy: Add a properly conditionalized
__attribute__ ((__nonnull__ (2)))
to glibc/math/bits/mathcalls.h line 116.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug math/13268] modf, modff, modfl: help GCC with argument checking
2011-10-05 23:44 [Bug math/13268] New: modf, modff, modfl: help GCC with argument checking bruno at clisp dot org
@ 2011-10-12 12:36 ` aj at suse dot de
2011-10-15 14:09 ` drepper.fsp at gmail dot com
2014-06-27 11:57 ` fweimer at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: aj at suse dot de @ 2011-10-12 12:36 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13268
Andreas Jaeger <aj at suse dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #1 from Andreas Jaeger <aj at suse dot de> 2011-10-12 12:36:01 UTC ---
Thanks. I send a patch to libc-alpha for this.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug math/13268] modf, modff, modfl: help GCC with argument checking
2011-10-05 23:44 [Bug math/13268] New: modf, modff, modfl: help GCC with argument checking bruno at clisp dot org
2011-10-12 12:36 ` [Bug math/13268] " aj at suse dot de
@ 2011-10-15 14:09 ` drepper.fsp at gmail dot com
2014-06-27 11:57 ` fweimer at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: drepper.fsp at gmail dot com @ 2011-10-15 14:09 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13268
Ulrich Drepper <drepper.fsp at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
CC| |drepper.fsp at gmail dot
| |com
Resolution| |FIXED
--- Comment #2 from Ulrich Drepper <drepper.fsp at gmail dot com> 2011-10-15 14:09:07 UTC ---
Changed in git.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug math/13268] modf, modff, modfl: help GCC with argument checking
2011-10-05 23:44 [Bug math/13268] New: modf, modff, modfl: help GCC with argument checking bruno at clisp dot org
2011-10-12 12:36 ` [Bug math/13268] " aj at suse dot de
2011-10-15 14:09 ` drepper.fsp at gmail dot com
@ 2014-06-27 11:57 ` fweimer at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2014-06-27 11:57 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=13268
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-27 11:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-05 23:44 [Bug math/13268] New: modf, modff, modfl: help GCC with argument checking bruno at clisp dot org
2011-10-12 12:36 ` [Bug math/13268] " aj at suse dot de
2011-10-15 14:09 ` drepper.fsp at gmail dot com
2014-06-27 11:57 ` fweimer at redhat dot com
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).