Message-Id: <200101211354.IAA23490@qnx.com> Subject: Re: Another item for develop.txi To: djgpp-workers AT delorie DOT com Date: Sun, 21 Jan 2001 08:54:15 -0500 (EST) From: "Alain Magloire" In-Reply-To: from "Eli Zaretskii" at Jan 21, 2001 09:33:43 AM X-Mailer: ELM [version 2.5 PL0b1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > > > On Sun, 21 Jan 2001, Martin Str|mberg wrote: > > > @item > > +When writing prototypes in header files remember to prefix any formal > > +arguments that you use with the underscore character (@samp{_}) to avoid > > +polluting the name space. > > I don't think formal parameters pollute the namespace, at least not in > most cases, but the text is okay, IMHO. I suggest to add an example of a > good prototype, though. Well I can show a bad example ;-) # cat x.cc --------------- int x (int __op); int x (int op) { return op; } --------------- # g++ -c x.cc Now try to compile this with g++. Variables, macros, etc .. that are start with a leading '_' are reserved by the C/C++ implementation, I do not have the C standard at hand so do not remember the wording. -- au revoir, alain ---- Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!