Comments (5)
Thanks for reporting. Could you tell me which version of gcc did you use? I
can't reproduce your error here with gcc 4.7.1, and the designators are
supported by the c99 and c11 standards. Anyway, I just committed a patch that
explicitly specifying the gnu99 standard for compiling. Please tell me if that
solves your problem.
Original comment by [email protected]
on 5 Apr 2013 at 1:00
from ulib.
Hi,
My gcc version is 4.6.3:
lch@hyperstream:/DT/local/ulib-svn$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-gnu-unique-object --enable-plugin --enable-objc-gc
--disable-werror --with-arch-32=i686 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
I just take the source from svn, but compilation fail at same point:
-e GEN hash_chain_r1.test
In file included from ../include/ulib/os_typelock.h:30:0,
from ../include/ulib/os_regionlock.h:32,
from ../include/ulib/hash_chain_r.h:32,
from hash_chain_r1.cpp:3:
../include/ulib/os_spinlock.h: In function ‘void
spin_lock_ticket(ticket_lock_t*)’:
../include/ulib/os_spinlock.h:302:37: error: expected primary-expression
before ‘.’ token
../include/ulib/os_spinlock.h: In function ‘void
spin_wrlock_ticket(ticket_rwlock_t*)’:
../include/ulib/os_spinlock.h:357:39: error: expected primary-expression
before ‘.’ token
../include/ulib/os_spinlock.h: In function ‘void
spin_wrunlock_ticket(ticket_rwlock_t*)’:
../include/ulib/os_spinlock.h:375:39: error: expected primary-expression
before ‘.’ token
../include/ulib/os_spinlock.h: In function ‘void
spin_rdlock_ticket(ticket_rwlock_t*)’:
../include/ulib/os_spinlock.h:403:39: error: expected primary-expression
before ‘.’ token
I can do some more tests for you, if you wish
Original comment by [email protected]
on 8 Apr 2013 at 8:22
from ulib.
It happens that the standard C++ doesn't support initialization with struct
designators, though newer g++'s and Intel C++ compiler do. It should compile
now.
Original comment by [email protected]
on 9 Apr 2013 at 3:20
- Changed state: Accepted
from ulib.
Thanks, its fixed :-)
But I have this small issue (I comment this line, and it's ok)
-e GEN hash_chain_r_bench.test
hash_chain_r_bench.cpp: In function ‘void constant_insert(long int, long
int)’:
hash_chain_r_bench.cpp:54:55: error: variable ‘it’ set but not used
[-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors
Original comment by [email protected]
on 10 Apr 2013 at 10:00
from ulib.
Hi Laurent,
You can simply ignore this warning. Actually, the variable 'it' is to tell the
compiler not to optimize the statement out, which is required for some
compilers.
Original comment by [email protected]
on 10 Apr 2013 at 10:10
- Changed state: Done
from ulib.
Related Issues (10)
- add gtest.h HOT 4
- Error on make in ubuntu 13.04 HOT 1
- ulib on OSX HOT 2
- AES_cbc_decrypt seems not working when in/out are the same (overlap) HOT 1
- aligned_hash HOT 3
- error during the test execution HOT 2
- 3 tests failed HOT 10
- open_hash_map's operation execution time is too long sometimes HOT 1
- Cannot build on OSX Mavericks HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ulib.