This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50660] warning about pass NULL to non pointer argument happens twice for template function call
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 07 Oct 2011 18:20:51 +0000
- Subject: [Bug c++/50660] warning about pass NULL to non pointer argument happens twice for template function call
- Auto-submitted: auto-generated
- References: <bug-50660-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50660
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|WAITING |NEW
Last reconfirmed|2011-10-07 00:00:00 |
Component|other |c++
Summary|gcc repeats warnings twice |warning about pass NULL to
| |non pointer argument
| |happens twice for template
| |function call
Known to fail| |4.5.0, 4.7.0
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-10-07 18:20:51 UTC ---
Simplified testcase:
#include <cstddef>
template<typename T> int f(T&);
int main(void)
{
return f<const int>(NULL);
}
--- CUT ---
t.cc: In function âint main()â:
t.cc:6:27: warning: passing NULL to non-pointer argument 1 of âint f(T&) [with
T = const int]â [-Wconversion-null]
t.cc:6:27: warning: passing NULL to non-pointer argument 1 of âint f(T&) [with
T = const int]â [-Wconversion-null]
It only happens with template functions too.
Confirmed.