From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id DF3B13858C51 for ; Mon, 20 Jun 2022 11:04:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DF3B13858C51 Received: by mail-ed1-x536.google.com with SMTP id b8so14556435edj.11 for ; Mon, 20 Jun 2022 04:04:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LEjWoiftV3K1TVx7quw9dqTuR0aEnbmCxkMD3nywATA=; b=BOPKW9mPt9/4SVKikSrryDhSFcFUAVCkkCOFqfVhOffq/cEyMDb2lRkp4C/GLVlDMK S0pov+YnlnlsrfptolVQb62QXF9U3iZe85gx7MaeeNfLGewg9Az6fGFjz3MVzgncXRsZ wFTdA73sGO2wT7+nSNthTFT+bfxuLdR/cFCQecjtc452t4q6KJWWc0PBZiWvo8DNZxEN N9XA+948CmJyZ+OO9W4XXAAMeRf7dyZXTnB5K+pta3+iOJQGUOewM38uT7kA2bBIAMlJ avKOKG21jnb+cDw93OCdJFTZnY5o1xAjgUXW6yj8+jvZS2FOgW4FGeROF0rJ8SmNfX3z v4RQ== X-Gm-Message-State: AJIora8YmL0QtJN8yuialPobEvwdeJoyUaV9zkHzGuqNpPqvBdJnh6hw xoef7LB0fHHerXQKSVZmu1b//9ImmsLeWaRoG1vXtgUCT/c= X-Google-Smtp-Source: AGRyM1v0n3Y1TdqWJqz7bDW1XnIMe0d7XNyD9q+oy6Zj0b7pRsZMjtlC0IPxPXhWp6PX/DWBrBAPLHiSRgBWl9WCWgc= X-Received: by 2002:a05:6402:3489:b0:431:3565:4cb0 with SMTP id v9-20020a056402348900b0043135654cb0mr28739942edc.135.1655723053220; Mon, 20 Jun 2022 04:04:13 -0700 (PDT) MIME-Version: 1.0 References: <87edzjn644.fsf@oldenburg.str.redhat.com> In-Reply-To: <87edzjn644.fsf@oldenburg.str.redhat.com> From: Reddy K Date: Mon, 20 Jun 2022 16:34:02 +0530 Message-ID: Subject: Re: Regarding FD_ZERO compilation warning To: Florian Weimer Cc: Reddy K via Libc-help X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2022 11:04:16 -0000 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 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 > >