This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/34710] FORTIFY_SOURCE matches to many patterns
- From: "graeme at argyllcms dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Feb 2008 00:04:28 -0000
- Subject: [Bug c/34710] FORTIFY_SOURCE matches to many patterns
- References: <bug-34710-15593@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from graeme at argyllcms dot com 2008-02-09 00:04 -------
The code is not "buggy". printf and fprintf are not reserved words, and
occupy a separate namespace with regard to the structure name and any
global function names. Because macros are a pre-process and don't understand
the language syntax, they don't respect the difference in namespace
and are therefore inherently dangerous and not guaranteed to work as
a mechanism to change the number of arguments to a function.
Ideally FORTIFY_SOURCE should use some other mechanism
that does respect the name spaces.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34710