unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Szabolcs Nagy <Szabolcs.Nagy@arm.com>
To: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>,
	DJ Delorie <dj@redhat.com>
Cc: nd <nd@arm.com>, "carlos@redhat.com" <carlos@redhat.com>,
	"libc-alpha@sourceware.org" <libc-alpha@sourceware.org>
Subject: Re: [RFC] Ignore source code comments in scripts/check-installed-headers.sh
Date: Thu, 17 Jan 2019 10:06:16 +0000	[thread overview]
Message-ID: <5ebbc5c6-dfed-e54d-ea5d-e7b97682036b@arm.com> (raw)
In-Reply-To: <87ef9c3zua.fsf@linux.ibm.com>

On 17/01/2019 00:14, Tulio Magno Quites Machado Filho wrote:
> DJ Delorie <dj@redhat.com> writes:
> 
>> I just tested this (gcc 4 and 7), and the #define didn't survive the
>> trip...
>>
>> $ cat foo.c
>> #define ulong unsigned long
>>
>> ulong x;  /* don't use ulong */
>>
>> $ gcc -E -fpreprocessed foo.c
>> # 3 "foo.c"
>> ulong x;
> 
> Yep.  You're right.
> We're back to the regex.  :-D

-Dd works for me:

$ cat foo.c
#define ulong unsigned long

ulong x; /* don't use ulong */

$ gcc -E -dD foo.c
# 1 "foo.c"
# 1 "<built-in>"
... gcc predefined macros ...
# 1 "<command-line>"
# 31 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 19 "/usr/include/stdc-predef.h" 3 4
#define _STDC_PREDEF_H 1
# 38 "/usr/include/stdc-predef.h" 3 4
#define __STDC_IEC_559__ 1







#define __STDC_IEC_559_COMPLEX__ 1
# 58 "/usr/include/stdc-predef.h" 3 4
#define __STDC_ISO_10646__ 201706L


#define __STDC_NO_THREADS__ 1
# 32 "<command-line>" 2
# 1 "foo.c"
#define ulong unsigned long

unsigned long x;

  reply	other threads:[~2019-01-17 10:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16 21:10 Failing misc/check-installed-headers-c with new kernel headers Carlos O'Donell
2019-01-16 21:21 ` Florian Weimer
2019-01-17  2:49   ` Carlos O'Donell
2019-01-18 10:15     ` Florian Weimer
2019-01-16 21:23 ` DJ Delorie
2019-01-16 23:05   ` [RFC] Ignore source code comments in scripts/check-installed-headers.sh Tulio Magno Quites Machado Filho
2019-01-16 23:15     ` DJ Delorie
2019-01-16 23:22       ` Tulio Magno Quites Machado Filho
2019-01-16 23:29         ` DJ Delorie
2019-01-17  0:14           ` Tulio Magno Quites Machado Filho
2019-01-17 10:06             ` Szabolcs Nagy [this message]
2019-01-17 10:09               ` Szabolcs Nagy
2019-01-19 16:44 ` Failing misc/check-installed-headers-c with new kernel headers Zack Weinberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5ebbc5c6-dfed-e54d-ea5d-e7b97682036b@arm.com \
    --to=szabolcs.nagy@arm.com \
    --cc=carlos@redhat.com \
    --cc=dj@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=nd@arm.com \
    --cc=tuliom@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).