From nobody@FreeBSD.org  Tue Jun 25 08:00:51 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id 3A139970
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 25 Jun 2013 08:00:51 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	by mx1.freebsd.org (Postfix) with ESMTP id 2D665191B
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 25 Jun 2013 08:00:51 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r5P80oqU094156
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 25 Jun 2013 08:00:50 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r5P80ow9094108;
	Tue, 25 Jun 2013 08:00:50 GMT
	(envelope-from nobody)
Message-Id: <201306250800.r5P80ow9094108@oldred.freebsd.org>
Date: Tue, 25 Jun 2013 08:00:50 GMT
From: Jukka Ukkonen <jau@iki.fi>
To: freebsd-gnats-submit@FreeBSD.org
Subject: clang-3.2 cpp inserts extra white spaces to certain macro values
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         179949
>Category:       kern
>Synopsis:       clang(1): clang-3.2 cpp inserts extra white spaces to certain macro values
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 25 08:10:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Tue Jun 25 17:48:21 UTC 2013
>Originator:     Jukka Ukkonen
>Release:        9.1-STABLE
>Organization:
-----
>Environment:
FreeBSD sleipnir 9.1-STABLE FreeBSD 9.1-STABLE #0 r252194M: Tue Jun 25 09:01:34 EEST 2013     root@sleipnir:/usr/obj/usr/src/sys/Sleipnir  amd64
>Description:
The cpp version installed with clang-3.2 breaks all macros which include a dash
in the value by inserting an extra space character before the dash.

This problem was found when ipfw configuration files which had been working just
fine with the gcc version of cpp suddenly started experiencing hiccups.

Assume there is a macro specifying typical windows ports and
an ipfw rule using that macro ...

#define PORTS 137-139, 445
..
add 03020 deny log logamount 0 { tcp or udp } from any to any PORTS via em1

Clang-3.2 version of cpp does this...

add 03020 deny log logamount 0 { tcp or udp } from any to any 137 -139, 445 via em1
--------------------------------------------------------------+++^+++++++++

while the cleaner approach produces ...

add 03020 deny log logamount 0 { tcp or udp } from any to any 137-139, 445 via em1

Clang-3.3 version of cpp seems to behave better leaving the macro values
untouched/unmodified.


>How-To-Repeat:
See full description above.
>Fix:
Upgrade clang-3.2 and related tools to clang-3.3 and tools.


>Release-Note:
>Audit-Trail:
>Unformatted:
