From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33669 invoked by alias); 22 Feb 2017 17:32:50 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 33549 invoked by uid 89); 22 Feb 2017 17:32:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy=H*r:sk:newlib@, stdatomic.h, UD:stdatomic.h, stdatomich X-HELO: mail-vk0-f47.google.com Received: from mail-vk0-f47.google.com (HELO mail-vk0-f47.google.com) (209.85.213.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 22 Feb 2017 17:32:47 +0000 Received: by mail-vk0-f47.google.com with SMTP id t8so5842808vke.3 for ; Wed, 22 Feb 2017 09:32:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=XybsPnB9wLcDKdn4XEuXe2xN4Ul77rBqAymkxfRgkig=; b=fmqNpmYXLsS4tZ7XiOks1tbXNjBfLmFiC5+srXCcFSahEwVyFwVZNXafOmq+Ilmd9k XhkDKNxMjVZWFqqezcXs0fIf15DTL2RrNAYLOy+vzdJ6Tfz6L1X7f1qBzcFF6SUAOM0Q 0WPaWVmoNVzOw7YyfNqndYsySE4fDNfE02XFf8nwwDY3hUWYxKatTh9As3/qx5rCu9XL yTBmOYwgiOLDCZk5GoIxTIkNiqQDn0n/QCilpxUYGy10M9ivmpy//riRFboQnS1GMy+/ uCfWE0SA93bsqiFlQbtLtgdjl51W14UCIDx8wogZbo6M3mHYbNht3j4USIWISQAtVpJ1 nDog== X-Gm-Message-State: AMke39lcl/n1Es1yHseJs0q0Eddtp4qW8i1V3/HVPkHLH7Mh5i6fYxZ9UZ+QY3yAb9s10IDI8uXBnmZipUwu6g== X-Received: by 10.31.141.203 with SMTP id p194mr15623771vkd.79.1487784765858; Wed, 22 Feb 2017 09:32:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.31.9 with HTTP; Wed, 22 Feb 2017 09:32:25 -0800 (PST) From: =?UTF-8?Q?Joakim_Nohlg=C3=A5rd?= Date: Wed, 22 Feb 2017 17:32:00 -0000 Message-ID: Subject: =?UTF-8?Q?stdatomic=2Eh_broken_on_GCC=2D5=2E4=2E0_=28error=3A_request_for_?= =?UTF-8?Q?member_=E2=80=98=5F=5Fval=E2=80=99_in_something_not_a_structure_or_union=29?= To: newlib@sourceware.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017/txt/msg00151.txt.bz2 Dear developers, The stdatomic.h header included with newlib gives compilation errors with recent GCC versions. GCC includes its own stdatomic.h, which works fine, but given that there are preprocessor conditionals in newlib's stdatomic.h for GCC makes me believe it has compiled OK at some point. % printf '%s\n%s' '#include ' '#include ' | \ arm-none-eabi-gcc -nostdinc \ -isystem /usr/arm-none-eabi/include \ -isystem /usr/lib/gcc/arm-none-eabi/5.4.0/include \ -x c -o /dev/null -c - In file included from :2:0: /usr/arm-none-eabi/include/stdatomic.h: In function =E2=80=98atomic_flag_test_and_set_explicit=E2=80=99: /usr/arm-none-eabi/include/stdatomic.h:386:10: error: request for member =E2=80=98__val=E2=80=99 in something not a structure or union return (atomic_exchange_explicit(&__object->__flag, 1, __order)); ^ /usr/arm-none-eabi/include/stdatomic.h: In function =E2=80=98atomic_flag_clear_explicit=E2=80=99: /usr/arm-none-eabi/include/stdatomic.h:393:2: error: request for member =E2=80=98__val=E2=80=99 in something not a structure or union atomic_store_explicit(&__object->__flag, 0, __order); ^ Building for i686-elf additionally gives errors about argument types: % printf '%s\n%s' '#include ' '#include ' | \ i686-elf-gcc -nostdinc \ -isystem /usr/i686-elf/include \ -isystem /usr/lib/gcc/i686-elf/5.4.0/include \ -x c -o /dev/null -c - /usr/i686-elf/include/stdatomic.h: In function =E2=80=98atomic_flag_test_and_set_explicit=E2=80=99: /usr/i686-elf/include/stdatomic.h:386:10: error: request for member =E2=80=98__val=E2=80=99 in something not a structure or union return (atomic_exchange_explicit(&__object->__flag, 1, __order)); ^ /usr/i686-elf/include/stdatomic.h:386:2: error: incompatible type for argument 1 of =E2=80=98__atomic_exchange_n=E2=80=99 return (atomic_exchange_explicit(&__object->__flag, 1, __order)); ^ /usr/i686-elf/include/stdatomic.h: In function =E2=80=98atomic_flag_clear_e= xplicit=E2=80=99: /usr/i686-elf/include/stdatomic.h:393:2: error: request for member =E2=80=98__val=E2=80=99 in something not a structure or union atomic_store_explicit(&__object->__flag, 0, __order); ^ /usr/i686-elf/include/stdatomic.h:393:2: error: incompatible type for argument 1 of =E2=80=98__atomic_store_n=E2=80=99 atomic_store_explicit(&__object->__flag, 0, __order); ^ I have no idea on what would be a proper fix though. Best regards, Joakim Nohlg=C3=A5rd