(printf) ("hello world\n");

Gabriel Dos Reis gdr@integrable-solutions.net
Wed Dec 10 13:36:00 GMT 2003


Segher Boessenkool <segher@kernel.crashing.org> writes:

| On 10-dec-03, at 13:27, Robert Dewar wrote:
| > Is it really true that the name printf is reserved? Is a C program not
| > allowed to define its own printf function (which might or might not be
| > varargs)? What's the story here?

Put Andreas' statement in context and use

       7.1.3  Reserved identifiers

[...]
  
         -- All identifiers with external linkage  in  any  of  the
            following  subclauses  (including  the  future  library
            directions) are always reserved for use as  identifiers
            with external linkage.154)
[...]

       [#2] No other identifiers  are  reserved.   If  the  program
       declares  or  defines an identifier in a context in which it
       is reserved (other than as allowed by 7.1.4), or  defines  a
       reserved  identifier  as  a  macro  name,  the  behavior  is
       undefined.



More information about the Gcc mailing list