Subject: misc/908: Comments after DEFINES
To: None <gnats-admin@NetBSD.ORG>
From: None <Rob.Leland@freetocreate.cais.com>
List: netbsd-bugs
Date: 03/25/1995 23:50:06
>Number:         908
>Category:       misc
>Synopsis:       Comments following #defines can be dangerious
>Confidential:   yes
>Severity:       serious
>Priority:       low
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 25 23:50:05 1995
>Originator:     Charlie &
>Organization:
	
>Confidential:i no	
>Release:        NetBSD-current	<NetBSD-current source date>
>Environment:
	
System: NetBSD freetocreate.cais.com 1.0A NetBSD 1.0A (FREETOCREATE) #2: Sat Mar 25 14:05:42 EST 1995 root@freetocreate.cais.com:/usr/src/sys/arch/amiga/compile/FREETOCREATE amiga
Architecture: amiga

>Description:
I have found that in practice a line like
#define SEG_VALUE  20 /* This is a SEG_VALUE */

can introduce bugs if a programmer gets sloppy and /* comments */
out code, which is not recommended.

The use of 
#define SEG_VALUE 20 //A C++ type commment is better.

and 
		/* SEG_VALUE This is a SEG_VALUE */
#define SEG_VALUE 20

Is more portable, but more verbose but more error proof.

Just my 2 cents worth.

-Rob
	
>How-To-Repeat:
	
>Fix:
	
>Audit-Trail:
>Unformatted: