Subject: port-m68k/3222: silly little bug.
To: None <gnats-bugs@gnats.netbsd.org>
From: Hiroshi HORIMOTO <horimoto@cs-aoi.cs.sist.ac.jp>
List: netbsd-bugs
Date: 02/17/1997 15:00:37
>Number: 3222
>Category: port-m68k
>Synopsis: Incorrect definition of macro `SYSTRAP(x)' for m68k.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Feb 16 22:05:00 1997
>Last-Modified:
>Originator: Hiroshi HORIMOTO
>Organization:
Shizuoka Institute Science and Technology, Japan
>Release: NetBSD-current on Feb 16, 1997
>Environment:
Machine: X68030 (x68k) w/ 030RC40, 882FN33. MEM:12MB MPU-CLOCK:33MHz
OS: NetBSD 1.2
Target: NetBSD-current source on Feb 16, 1997 (updating now..)
System: NetBSD zeek 1.2 NetBSD 1.2 (ZERO) #16: Tue Jan 21 08:01:14 JST 1997 jeanne@zeek:/usr/src/sys/arch/x68k/compile/ZERO x68k
>Description:
In src/lib/libc/arch/m68k/SYS.h, macro SYSTRAP is defined incorrectly
for __STDC__ mode.
It will be expanded as follows..
zeek % gcc -E -
#define S(x) movl \#SYS_ ## x,d0; trap \#0
S(foo)
^D
:1: `#' operator should be followed by a macro argument name
:1: `#' operator is not followed by a macro argument name
# 1 ""
movl \SYS_foo ,d0; trap \0
zeek %
>How-To-Repeat:
>Fix:
Thus, please fix it as follows..
#ifdef __STDC__
#define _Immediate_ #
#define SYSTRAP(x) movl _Immediate_ SYS_ ## x ## ,d0; trap _Immediate_ 0
#else
#define SYSTRAP(x) movl #SYS_/**/x,d0; trap #0
#endif
>Audit-Trail:
>Unformatted: