public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Reddy K <haritha.ponnolu@gmail.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: Reddy K via Libc-help <libc-help@sourceware.org>
Subject: Re: Regarding FD_ZERO compilation warning
Date: Mon, 20 Jun 2022 16:34:02 +0530	[thread overview]
Message-ID: <CAF7YG7obscE+ieCs68v+FJxh+GiNoEAVrmtay2WdzUrji9XOog@mail.gmail.com> (raw)
In-Reply-To: <87edzjn644.fsf@oldenburg.str.redhat.com>

Hi Florian,
Thank you very much for your help.

As you suggested, I have generated  preprocessed sources with gcc -E.
Please find macro expansion below.
-------------------
 do { int __d0, __d1; __asm__ __volatile__ ("cld; rep; " "stosq" : "=c"
(__d0), "=D" (__d1) : "a" (0), "0" (sizeof (fd_set) / sizeof (__fd_mask)),
"1" (&((&readfds)->__fds_bits)[0]) : "memory"); } while (0);
---------------------

thanks & regards,
Haritha

On Mon, Jun 20, 2022 at 1:01 PM Florian Weimer <fweimer@redhat.com> wrote:

> * Reddy K. via Libc-help:
>
> > I have enabled all compilation flags and did "make" build. I got the
> > warning below and have tried to include required header files ( select.h,
> > time.h, types.h and unistd.h) but still it shows the warning. So can you
> > please help me to fix this.
> >
> > ds_locator.c:930:2: warning: traditional C rejects string constant
> > concatenation [-Wtraditional]
> > FD_ZERO(&readfds);
> >
> > I am pasting the code snippet below to understand how variable readfds
> > define.
> > -----------------------------
> > fd_set readfds;
> > FD_ZERO(&readfds);
> >
> > ----------------------------
>
> I don't see how glibc's FD_ZERO can trigger this compiler warning.
>
> I suggest you generate preprocessed sources with gcc --save-temps or gcc
> -E, and show us the macro expansion.
>
> In general, there is no expectation that the glibc headers are clean
> with -Wtraditional, quite the opposite actually.  We require an ISO C
> compiler.
>
> Thanks,
> Florian
>
>

  reply	other threads:[~2022-06-20 11:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20  3:47 Reddy K
2022-06-20  7:31 ` Florian Weimer
2022-06-20 11:04   ` Reddy K [this message]
2022-06-20 11:09     ` Florian Weimer
2022-06-20 11:23       ` Reddy K
2022-06-20 11:26         ` Florian Weimer

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

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

  git send-email \
    --in-reply-to=CAF7YG7obscE+ieCs68v+FJxh+GiNoEAVrmtay2WdzUrji9XOog@mail.gmail.com \
    --to=haritha.ponnolu@gmail.com \
    --cc=fweimer@redhat.com \
    --cc=libc-help@sourceware.org \
    /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).