From owner-freebsd-hackers Tue Aug 13 08:56:52 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA20835 for hackers-outgoing; Tue, 13 Aug 1996 08:56:52 -0700 (PDT) Received: from gatekeeper.ctron.com (ctron.com [134.141.197.25]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id IAA20824 for ; Tue, 13 Aug 1996 08:56:46 -0700 (PDT) Received: (from news@localhost) by gatekeeper.ctron.com (8.6.12/8.6.9) id LAA10197 for ; Tue, 13 Aug 1996 11:56:45 -0400 Received: from stealth.ctron.com(134.141.5.107) by gatekeeper via smap (V1.3mjr) id sma010173; Tue Aug 13 11:56:33 1996 Received: from thoth.ctron.com by stealth.ctron.com (4.1/SMI-4.1) id AA12968; Tue, 13 Aug 96 11:54:40 EDT Received: from thoth (localhost [127.0.0.1]) by thoth.ctron.com (8.6.12/8.6.12) with SMTP id LAA00373 for ; Tue, 13 Aug 1996 11:57:32 -0400 Message-Id: <3210A5EC.60B5@ctron.com> Date: Tue, 13 Aug 1996 11:57:32 -0400 From: Alexander Seth Jones Organization: Cabletron Systems, Inc. X-Mailer: Mozilla 3.0b5aGold (X11; I; SunOS 5.4 sun4m) Mime-Version: 1.0 To: hackers@freefall.freebsd.org Subject: and C++ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Hello, I'm writing a device driver in C++, and have run into a problem with the GENSPL macro in . g++ is croaking on the statement: __asm __volatile("":::"memory"); with the following error: parse error before "::" Without getting into an argument about whether g++ is in error about accepting the code as it is, I'm asking whether or not this code fragment even needs to exist. Now, I just tried an interesting experiment. I generated the assembly code (using init_main.c) with the asm declaration in there. It produced #APP #NO_APP where the asm declaration should be. Then I generated the assembly with the asm declaration removed, and the code was the exact same except the #APP/#NO_APP code was gone. gas also says: If the first line of an input file is `#NO_APP' or if you use the `-f' option, whitespace and comments are not removed from the input file. Within an input file, you can ask for whitespace and comment removal in specific portions of the by putting a line that says `#APP' before the text that may contain whitespace or comments, and putting a line that says `#NO_APP' after this text. This feature is mainly intend to support `asm' statements in compilers whose output is otherwise free of comments and whitespace. So it seems like the asm statement is a no-op. Is this a fair assumption? Can I just safely get rid of it? What are people's thoughts about this? -- Alex Jones | ajones@ctron.com Cabletron Systems, Inc. Durham, NH USA 03824