public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52929] New: use of undeclared identifier '__ATOMIC_ACQ_REL'
@ 2012-04-10 18:46 os at xeviox dot com
  2012-04-10 18:55 ` [Bug c++/52929] " ncahill_alt at yahoo dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: os at xeviox dot com @ 2012-04-10 18:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52929

             Bug #: 52929
           Summary: use of undeclared identifier '__ATOMIC_ACQ_REL'
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: os@xeviox.com


The error occurs on Archlinux x64 with everything updated.
The project uses Qt 4.8.x which was installed using the package manager. I also
tried compiling with clang, which came up with the same error.

The following error breaks the compile:

In file included from /usr/include/QtCore/qstring.h:54:
In file included from
/usr/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/string:53:
In file included from
/usr/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h:40:
/usr/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/atomicity.h:48:45:
error:
      use of undeclared identifier '__ATOMIC_ACQ_REL'
  { return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
                                            ^
/usr/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/atomicity.h:52:38:
error:
      use of undeclared identifier '__ATOMIC_ACQ_REL'
  { __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
                                     ^
2 errors generated.
make[1]: *** [../bin/debug/obj/main.o] Error 1
make[1]: Leaving directory `/tmp/qirk/src'
make: *** [sub-src-make_default-ordered] Error 2

I also tried to find the define using grep:

# grep -r __ATOMIC_ACQ_REL /usr/include/
/usr/include/c++/4.7.0/bits/shared_ptr_base.h:                      true,
__ATOMIC_ACQ_REL, 
/usr/include/c++/4.7.0/ext/atomicity.h:  { return __atomic_fetch_add(__mem,
__val, __ATOMIC_ACQ_REL); }
/usr/include/c++/4.7.0/ext/atomicity.h:  { __atomic_fetch_add(__mem, __val,
__ATOMIC_ACQ_REL); }
/usr/include/c++/4.7.0/profile/impl/profiler_state.h:                      
&inv, __s, false, __ATOMIC_ACQ_REL, 
/usr/include/c++/4.7.0/parallel/compatibility.h:    return
__atomic_fetch_add(__ptr, __addend, __ATOMIC_ACQ_REL);
/usr/include/c++/4.7.0/parallel/compatibility.h:    return
__atomic_fetch_add(__ptr, __addend, __ATOMIC_ACQ_REL);
/usr/include/c++/4.7.0/parallel/compatibility.h:    return
__atomic_fetch_add(__ptr, __addend, __ATOMIC_ACQ_REL);
/usr/include/c++/4.7.0/parallel/compatibility.h:                       false,
__ATOMIC_ACQ_REL,
/usr/include/c++/4.7.0/parallel/compatibility.h:                       false,
__ATOMIC_ACQ_REL,
/usr/include/c++/4.7.0/parallel/compatibility.h:                       false,
__ATOMIC_ACQ_REL,
/usr/include/c++/4.7.0/tr1/shared_ptr.h:                      true,
__ATOMIC_ACQ_REL, 

Greetings
Ben


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/52929] use of undeclared identifier '__ATOMIC_ACQ_REL'
  2012-04-10 18:46 [Bug c++/52929] New: use of undeclared identifier '__ATOMIC_ACQ_REL' os at xeviox dot com
@ 2012-04-10 18:55 ` ncahill_alt at yahoo dot com
  2012-04-10 20:19 ` amacleod at redhat dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ncahill_alt at yahoo dot com @ 2012-04-10 18:55 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52929

ncahill_alt at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ncahill_alt at yahoo dot
                   |                            |com

--- Comment #1 from ncahill_alt at yahoo dot com 2012-04-10 18:54:51 UTC ---
Regarding this, I've found that __ATOMIC_ACQ_REL is new in 4.7.0, it is not
used in any 4.6.x.  And also my source-built 4.7.0 is lacking a #define for
this macro.

Neil.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/52929] use of undeclared identifier '__ATOMIC_ACQ_REL'
  2012-04-10 18:46 [Bug c++/52929] New: use of undeclared identifier '__ATOMIC_ACQ_REL' os at xeviox dot com
  2012-04-10 18:55 ` [Bug c++/52929] " ncahill_alt at yahoo dot com
@ 2012-04-10 20:19 ` amacleod at redhat dot com
  2012-04-10 20:54 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: amacleod at redhat dot com @ 2012-04-10 20:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52929

Andrew Macleod <amacleod at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amacleod at redhat dot com

--- Comment #2 from Andrew Macleod <amacleod at redhat dot com> 2012-04-10 20:18:01 UTC ---
It is built in to the C preprocessor as a predefined value in GCC 4.7  (see
cppbuiltin.c), so you wouldn't find a specific #define anywhere.  

The __atomic built-ins don't work properly without at least a GCC 4.7 compiler,
so you wouldn't be able to compile them properly with a different compiler.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/52929] use of undeclared identifier '__ATOMIC_ACQ_REL'
  2012-04-10 18:46 [Bug c++/52929] New: use of undeclared identifier '__ATOMIC_ACQ_REL' os at xeviox dot com
  2012-04-10 18:55 ` [Bug c++/52929] " ncahill_alt at yahoo dot com
  2012-04-10 20:19 ` amacleod at redhat dot com
@ 2012-04-10 20:54 ` redi at gcc dot gnu.org
  2012-04-11 15:19 ` os at xeviox dot com
  2012-04-11 15:43 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2012-04-10 20:54 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52929

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-04-10
     Ever Confirmed|0                           |1

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-10 20:53:36 UTC ---
Please read http://gcc.gnu.org/bugs/ and provide the requested information.

Tell us what "gcc -v" shows, attach preprocessed source etc.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/52929] use of undeclared identifier '__ATOMIC_ACQ_REL'
  2012-04-10 18:46 [Bug c++/52929] New: use of undeclared identifier '__ATOMIC_ACQ_REL' os at xeviox dot com
                   ` (2 preceding siblings ...)
  2012-04-10 20:54 ` redi at gcc dot gnu.org
@ 2012-04-11 15:19 ` os at xeviox dot com
  2012-04-11 15:43 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: os at xeviox dot com @ 2012-04-11 15:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52929

--- Comment #4 from Ben <os at xeviox dot com> 2012-04-11 15:18:16 UTC ---
System: Archlinux x64 / XFCE
IDE: QtCreator 2.4
Buildsystem: qmake
Used libraries: qt 4.6.x
Language: C++

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/src/gcc-4.7-20120407/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id
--with-ppl --enable-cloog-backend=isl --enable-lto --enable-gold
--enable-ld=default --enable-plugin --with-plugin-ld=ld.gold
--with-linker-hash-style=gnu --disable-multilib --disable-libssp
--disable-build-with-cxx --disable-build-poststage1-with-cxx
--enable-checking=release
Thread model: posix
gcc version 4.7.0 20120407 (prerelease) (GCC)

Sadly I'm unable to build the break again. I've installed gcc4.4 to be able to
build the project again. But now even gcc4.7 is able to build it..

Anything I can do to help?

Ben


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/52929] use of undeclared identifier '__ATOMIC_ACQ_REL'
  2012-04-10 18:46 [Bug c++/52929] New: use of undeclared identifier '__ATOMIC_ACQ_REL' os at xeviox dot com
                   ` (3 preceding siblings ...)
  2012-04-11 15:19 ` os at xeviox dot com
@ 2012-04-11 15:43 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2012-04-11 15:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52929

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-11 15:42:51 UTC ---
It sounds as though you messed up your system somehow so that an older gcc (or
older preprocessor) was using the headers from gcc 4.7, otherwise the error
shouldn't be possible.  The fact it's disappeared after reinstalling something
supports that hypothesis.

Closing as invalid, please re-open if you can reproduce it, or report it to
Arch.

(In reply to comment #4)
> gcc version 4.7.0 20120407 (prerelease) (GCC)

I do wish Arch wouldn't fsck with the version string like that, 4.7.0 was
already released prior to 20120407.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-04-11 15:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-10 18:46 [Bug c++/52929] New: use of undeclared identifier '__ATOMIC_ACQ_REL' os at xeviox dot com
2012-04-10 18:55 ` [Bug c++/52929] " ncahill_alt at yahoo dot com
2012-04-10 20:19 ` amacleod at redhat dot com
2012-04-10 20:54 ` redi at gcc dot gnu.org
2012-04-11 15:19 ` os at xeviox dot com
2012-04-11 15:43 ` redi at gcc dot gnu.org

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).