http://sourceware.org/bugzilla/show_bug.cgi?id=12390
Summary: binutils as accepts single '/' as if it were a comment
Product: binutils
Version: unspecified
Status: NEW
Severity: minor
Priority: P2
Component: gas
AssignedTo: [email protected]
ReportedBy: [email protected]
I found some code in the wild (NSPR from Mozilla) which is using / as a comment
block, ala.:
/ -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/
/ ***** BEGIN LICENSE BLOCK *****
/ Version: MPL 1.1/GPL 2.0/LGPL 2.1
/
which isn't a documented way of writing a comment. Now, the documentation does
say "On some machines there are two different line comment characters. One
character only begins a comment if it is the first non-whitespace character on
a line, while the other always begins a comment." but never specifies whether /
is such a character.
I'm going to propose that gas document the support of '//' style comments
(along-side /* and */) and change code to reject bare '/'. On the other side,
I'm going to ask the Mozilla folks to change their code from '/' to '//' for
these comments.
Quick reference, the documentation I refer to is
http://sourceware.org/binutils/docs-2.21/as/Comments.html#Comments
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-binutils