Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annoying warning (‘-pedantic’ is not an option that controls warnings) #27

Closed
concatime opened this issue Jul 29, 2017 · 9 comments
Closed

Comments

@concatime
Copy link

concatime commented Jul 29, 2017

Hi. When I compile this repo. from nginx, I get this minor warning:

checking for strnlen... In file included from atomic_ops.c:78:0:
atomic_ops/sysdeps/standard_ao_double_t.h:35:37: warning: ‘-pedantic’ is not an option that controls warnings [-Wpragmas]
 #     pragma GCC diagnostic ignored "-pedantic"
                                     ^~~~~~~~~~~

Maybe It could be relevant? Or not.

@ivmai
Copy link
Owner

ivmai commented Jul 30, 2017

Which compiler version?

@concatime
Copy link
Author

concatime commented Jul 30, 2017

Oh, sorry. I used gcc 7.1.1 on Fedora 26.

@ivmai
Copy link
Owner

ivmai commented Jul 31, 2017

If you replace "-pedantic" to "-Wpedantic" in atomic_ops.c, does it remove the warning?

@concatime
Copy link
Author

I'm sorry, but there is no -pedantic in src/atomic_ops.c.

@concatime
Copy link
Author

concatime commented Aug 1, 2017

Trying to compile directly from source using gcc, I get this:

./configure --disable-static --enable-shared --libdir=/opt/local/lib --includedir=/opt/local/include
[…]
libtool: compile:  gcc -DHAVE_CONFIG_H -I../src -I../src -fPIC -Wall -Wextra -Wpedantic -Wno-long-long -g -O2 -MT atomic_ops.lo -MD -MP -MF .deps/atomic_ops.Tpo -c atomic_ops.c  -fPIC -DPIC -o .libs/atomic_ops.o
In file included from atomic_ops.c:78:0:
atomic_ops/sysdeps/standard_ao_double_t.h:35:37: warning: ‘-pedantic’ is not an option that controls warnings [-Wpragmas]
 #     pragma GCC diagnostic ignored "-pedantic"
                                     ^~~~~~~~~~~
atomic_ops/sysdeps/standard_ao_double_t.h:37:22: warning: ISO C does not support ‘__int128’ types [-Wpedantic]
     typedef unsigned __int128 double_ptr_storage;
                      ^~~~~~~~

@ivmai
Copy link
Owner

ivmai commented Aug 1, 2017

Ah, sorry I meant src/atomic_ops/sysdeps/standard_ao_double_t.h.

@concatime
Copy link
Author

Ok, cool, that works perfectly bro! It seems that GCC before ~4.8 does not accept "-Wpedantic" quietly. Maybe you can add a version checking? Moreover, could you provide an option to install only shared libraries like here, it would be really useful for a lot of us.
Thank you, and I'll leave you the honor (or honour if you're more "British") to close the issue ;)

ivmai added a commit that referenced this issue Aug 2, 2017
…sage

(fix commit 7633154)

Issue #27 (libatomic_ops).

* src/atomic_ops/sysdeps/standard_ao_double_t.h
[(__x86_64__ && AO_GCC_ATOMIC_TEST_AND_SET || __aarch64__)
&& !__ILP32__ && AO_GNUC_PREREQ(4, 7)] (pragma GCC diagnostic):
Use "-Wpedantic" (instead of "-pedantic") if GCC v7+.
@ivmai
Copy link
Owner

ivmai commented Aug 2, 2017

Fixed in 7fad46e

@ivmai ivmai changed the title Annoying warning. Annoying warning (‘-pedantic’ is not an option that controls warnings) Aug 2, 2017
@ivmai
Copy link
Owner

ivmai commented Aug 2, 2017

Request about shared-only libraries installation is moved to #28

@ivmai ivmai closed this as completed Aug 2, 2017
ivmai added a commit that referenced this issue Sep 20, 2017
…sage

(fix commit 7633154)

Issue #27 (libatomic_ops).

* src/atomic_ops/sysdeps/standard_ao_double_t.h
[(__x86_64__ && AO_GCC_ATOMIC_TEST_AND_SET || __aarch64__)
&& !__ILP32__ && AO_GNUC_PREREQ(4, 7)] (pragma GCC diagnostic):
Use "-Wpedantic" (instead of "-pedantic") if GCC v7+.
ivmai added a commit that referenced this issue Sep 27, 2017
…ssage

(fix commits 7633154, 7fad46e)

Issue #27 (libatomic_ops).

* src/atomic_ops/sysdeps/standard_ao_double_t.h
[(__x86_64__ && AO_GCC_ATOMIC_TEST_AND_SET || __aarch64__)
&& !__ILP32__ && AO_GNUC_PREREQ(4, 7)] (pragma GCC diagnostic):
Use "-Wpedantic" (instead of "-pedantic") if GCC v6.4+.
ivmai added a commit that referenced this issue Oct 13, 2017
…ssage

(fix commits 7633154, 7fad46e)

Issue #27 (libatomic_ops).

* src/atomic_ops/sysdeps/standard_ao_double_t.h
[(__x86_64__ && AO_GCC_ATOMIC_TEST_AND_SET || __aarch64__)
&& !__ILP32__ && AO_GNUC_PREREQ(4, 7)] (pragma GCC diagnostic):
Use "-Wpedantic" (instead of "-pedantic") if GCC v6.4+.
ivmai added a commit that referenced this issue Feb 8, 2022
…ssage

(fix of commit cd7fd85)

Issue #27 (libatomic_ops).

* src/atomic_ops/sysdeps/standard_ao_double_t.h [(__x86_64__
&& AO_GCC_ATOMIC_TEST_AND_SET || __aarch64__) && !__ILP32__
&& AO_GNUC_PREREQ(6,0)]: Use "-Wpedantic" (instead of "-pedantic").
ivmai added a commit that referenced this issue Feb 22, 2022
…ssage

(fix of commit cd7fd85)

Issue #27 (libatomic_ops).

* src/atomic_ops/sysdeps/standard_ao_double_t.h [(__x86_64__
&& AO_GCC_ATOMIC_TEST_AND_SET || __aarch64__) && !__ILP32__
&& AO_GNUC_PREREQ(6,0)]: Use "-Wpedantic" (instead of "-pedantic").
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants