www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - Extraneous ; - love it!!

Walter

Another hearty congrats

In doing some compiler comparative work, I'm running my base COM library (44
C & 37 C++ source file; 111 header files) through a range of compilers.

DMC++ has again shone its little beacon of quality on my code.

It has been my practise for a number of years to denote empty blocks,
whether they be methods or loop contents, as the following

 {}

not

 {
 }

nor, in the case of loops,

 ;

However, we're now passing into code that's been unchanged for over half a
decade - has COM been going that long? No wonder the M$ marketing team have
decided it is in our best interests to have something new to learn! - and
joy of joys, DMC++ informs me

  "Warning 7: possible extraneous ';'"

since

  for(end = dir; *end != xT('\0'); ++end);

should be written as is my (current) wont

  for(end = dir; *end != xT('\0'); ++end)
 {}

Nice one. ;)
Jun 11 2003