[cfe-dev] #ident preprocessor directive is ignored ?
Jordan Rose
jordan_rose at apple.com
Wed Oct 24 09:07:08 PDT 2012
On Oct 24, 2012, at 7:52 , Douglas Gregor <dgregor at apple.com> wrote:
>
> On Oct 24, 2012, at 6:47 AM, Xavier Roche <roche+kml2 at exalead.com> wrote:
>
>> Hi folks!
>>
>> The #ident preprocessor directive seems to be missing (actually it seems to be /ignored/) - is it a known behavior ?
>>
>> Ie. the following program:
>>
>> #ident "$$Description: ident-test $$"
>> int main(void) { return 0; }
>>
>> Produces a binary without the given RCS string:
>>
>> $ ident ident-test-clang
>> ident-test-clang:
>>
>> [ Yes, I admit that the venerable RCS strings are a bit outdated, but there is no other standard way AFAIK to include useful meta-data in libraries, such as version/build information. ]
>
> Clang parses #ident and then throws the results away. It's never been important enough to anyone to actually pass this information through.
...patches welcome. :-)
More information about the cfe-dev
mailing list