|
From: | Sergey Korshunoff |
Subject: | [Tinycc-devel] gcc/tcc nested macros difference |
Date: | Sun, 24 Apr 2016 18:09:37 +0300 |
Hi! A test file: #define __le16_to_cpu(x) ((__u16)(x)) #define le16_to_cpu __le16_to_cpu static void pcnet32_load_multicast (struct net_device *dev) { mcast_table [crc >> 4] = le16_to_cpu(le16_to_cpu(mcast_table [crc >> 4]) | (1 << (crc & 0xf))); return; } GCC -E output: ... mcast_table [crc >> 4] = ((__u16)(((__u16)(mcast_table [crc >> 4])) | (1 << (crc & 0xf)))); TCC -E output: ... mcast_table [crc >> 4] = ((__u16)(__le16_to_cpu(mcast_table [crc >> 4]) | (1 << (crc & 0xf)))) Look at the __ie16_to_cpu presence in the tcc output: nested macro was not expanded.
[Prev in Thread] | Current Thread | [Next in Thread] |