Re: c preprocessor expansion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 8, 2009 at 6:11 PM, ninjaboy <n0b0dyn1nj4@xxxxxxxxx> wrote:
> 2009/1/8 Task Struct From Hell <taskstructfromhell@xxxxxxxxxxxxxx>:
>> Hi,
>>
>> I was wondering if gcc has any argument which allows for the expansion
>> of all macros in a file, just so if we have something like the
>> following:
>>
>>
>> #define FOO "bar"
>>
>> int main() {
>>   printf(FOO);
>> }
>>
>> It will output this:
>>
>> int main() {
>>   printf("bar");
>> }
>>
>
> gcc -E code.c -o codemacro.m

Cheers for all responses so far!
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux