Eric Lemings wrote:
-----Original Message-----
From: Martin Sebor [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 15, 2008 4:26 PM
To: [email protected]
Subject: Re: New 27.basic.ios.cpp test migrated (LONG)

...
About the test, it looks good to me. It needs only a few minor
tweaks :)

Regarding the convention for preprocessor directives, it is
2 spaces and if there are places where it's inconsistent they
should be fixed :)

Is there a reason its 2 spaces instead of 4?  If not, it should
be fixed everywhere i.e. made consistent in all contexts. :)

Not one I know of. It's just something we inherited/adopted over
time.


[...]
Hmm.  I noticed variable names for command-line options in other
tests using the rw_ prefix so I used it also.  Funny how undesired
conventions get propagated, huh?

Some of them probably crept in from the driver.


[...]
Good eye.  Is there a rationale for this or is just preference?
For me, this is just a holdover from K&R C.

Same as with the preprocessor directives.


Also, I just noticed the link to the style document on the home
page is broken.  Is it stored in Subversion or some other place
maybe?  Probably should give it a quick glance...

It's not broken -- it's a placeholder for a future document. Feel
free to start a page documenting the existing style on the Wiki.


Finally, every function is extern by default. There is no need
to explicitly declare it as such (I believe there are compilers
that warn about function definitions with the extern keyword).

Yep, and return types of functions default(ed?) to `int' type when
omitted though I'm not sure that still holds but they're still
always explictly specified nonetheless.  Same premise: never
rely on the default.

C++ doesn't allow missing return types. I don't think C99 does
either.

Martin

Reply via email to