Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #88300
| From | Paavo Helde <eesnimi@osa.pri.ee> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: g++ -c -Werror -Weverything exercise_2_17.cpp |
| Date | 2022-12-29 23:20 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <tol0b7$dnjr$1@dont-email.me> (permalink) |
| References | <566e441b-e915-4a5d-802e-5b8b3926cac5n@googlegroups.com> <toktj3$bqr$3@gioia.aioe.org> |
29.12.2022 22:33 Juha Nieminen kirjutas: > gdo...@gmail.com <gdotone@gmail.com> wrote: >> compiling a simple program, including <iostream> >> >> using: >> g++ -c -Werror -Weverything exercise_2_17.cpp >> >> -Weverything is producing this: >> >> g++ -c -Werror -Weverything exercise_2_17.cpp >> error: include location '/usr/local/include' is unsafe for cross-compilation [-Werror,-Wpoison-system-directories] >> 1 error generated. >> >> if I don't use -Weverything source compiles fine, no errors or warning messages. > > Don't enable all warnings. Some warnings are extremely specific and not even > intended for regular use, only for very special circumstances. > > -Wall is a relatively safe bet. If you want a bit more, also add -Wextra. There are other warnings in addition to -Wall -Wextra which I have found to be useful for me, e.g. -Wpointer-arith -Wcast-align -Wstrict-aliasing=1 -Werror=type-limits And vice versa, -Wall -Wextra triggers some unneeded warnings which I am switching off by -Wno-... options.
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
g++ -c -Werror -Weverything exercise_2_17.cpp "gdo...@gmail.com" <gdotone@gmail.com> - 2022-12-27 01:22 -0800
Re: g++ -c -Werror -Weverything exercise_2_17.cpp Öö Tiib <ootiib@hot.ee> - 2022-12-27 02:50 -0800
Re: g++ -c -Werror -Weverything exercise_2_17.cpp Juha Nieminen <nospam@thanks.invalid> - 2022-12-29 20:33 +0000
Re: g++ -c -Werror -Weverything exercise_2_17.cpp Paavo Helde <eesnimi@osa.pri.ee> - 2022-12-29 23:20 +0200
Re: g++ -c -Werror -Weverything exercise_2_17.cpp Juha Nieminen <nospam@thanks.invalid> - 2022-12-30 21:05 +0000
Re: g++ -c -Werror -Weverything exercise_2_17.cpp Paavo Helde <eesnimi@osa.pri.ee> - 2022-12-30 23:33 +0200
Re: g++ -c -Werror -Weverything exercise_2_17.cpp Juha Nieminen <nospam@thanks.invalid> - 2022-12-31 15:05 +0000
Re: g++ -c -Werror -Weverything exercise_2_17.cpp David Brown <david.brown@hesbynett.no> - 2022-12-31 16:40 +0100
Re: g++ -c -Werror -Weverything exercise_2_17.cpp Juha Nieminen <nospam@thanks.invalid> - 2023-01-03 06:27 +0000
Re: g++ -c -Werror -Weverything exercise_2_17.cpp David Brown <david.brown@hesbynett.no> - 2023-01-03 08:51 +0100
Re: g++ -c -Werror -Weverything exercise_2_17.cpp Juha Nieminen <nospam@thanks.invalid> - 2023-01-03 09:13 +0000
Re: g++ -c -Werror -Weverything exercise_2_17.cpp David Brown <david.brown@hesbynett.no> - 2023-01-03 11:47 +0100
Re: g++ -c -Werror -Weverything exercise_2_17.cpp Paavo Helde <eesnimi@osa.pri.ee> - 2022-12-31 18:50 +0200
Re: g++ -c -Werror -Weverything exercise_2_17.cpp David Brown <david.brown@hesbynett.no> - 2022-12-31 18:47 +0100
csiph-web