This is the mail archive of the
mailing list for the GCC project.
C++: Anticipated declaration of builtins
- From: gcc at integrable-solutions dot net
- To: gcc at gcc dot gnu dot org
- Cc: jason at redhat dot com
- Date: 25 May 2003 22:49:18 +0200
- Subject: C++: Anticipated declaration of builtins
- Organization: Integrable Solutions
Currently, anticipated declarations of builtin functions whose names do
not begin with underscores are done as follows:
* a pre-declaration at the standard namespace scope std::
* a pre-declaration at the global scope.
The actual code reads:
/* All builtins that don't begin with an '_' should additionally
go in the 'std' namespace. */
if (name != '_')
builtin_function_1 (name, type, std_node, code, class, libname, attrs);
return builtin_function_1 (name, type, NULL_TREE, code,
class, libname, attrs);
I have two questions:
1) Shouldn't we pre-declare the function at global scope, then do a
using-declaration at the standard scope?
2) Why doesn't the second call to builtin_function_1() specify
global_namespace instead of NULL_TREE? I think specifying
global_namespace should be the way to go. What I am missing?