Re: Preprocessor directives in preprocessed file

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

 



Xi Ruoyao via Gcc-help <gcc-help@xxxxxxxxxxx> writes:

> On Sat, 2023-09-02 at 21:15 +0200, Andy via Gcc-help wrote:
>> Some lines are like:
>> # 1 "/usr/include/x86_64-linux-gnu/bits/pthread_stack_min.h" 1 3 4
>> 
>> 3 means - standard file
>> 
>> whereas my header
>> # 1 "/home/andrzej/wazne/gitmy/c-grammars/src/header.h"
>> what is exact meaning of this numbers?
>
> See section 9 "Preprocessor Output" of "info cpp".
>
>> I want filter preprocessed file, throw away all lines from standard
>> headers, but to leave preprocessed lines from main C file and all
>> non-standard headers.
>
> Write a tool yourself.  GCC is a compiler for compiling real programs,
> not for supporting some "academical" or "learning" process.

That's unnecessarily restrictive and hostile.

Anyway, yes, see (cpp)Preprocessor Output for a description of the
markers, to suppress them you can use -P, see (cpp)Invocation.
-- 
Arsen Arsenović

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux