Date: Tue, 25 Jun 2013 08:00:50 GMT From: Jukka Ukkonen <jau@iki.fi> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/179949: clang-3.2 cpp inserts extra white spaces to certain macro values Message-ID: <201306250800.r5P80ow9094108@oldred.freebsd.org> Resent-Message-ID: <201306250810.r5P8A0Og003513@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 179949 >Category: kern >Synopsis: 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: >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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306250800.r5P80ow9094108>