Displaying 20 results from an estimated 32 matches for "wunreach".
Did you mean:
unreach
2020 Oct 19
5
[RFC] treewide: cleanup unreachable breaks
...Tom,
If you're able to automate this cleanup, I suggest checking in a
script that can be run on a directory. Then for each subsystem you
can say in your commit "I ran scripts/fix_whatever.py on this subdir."
Then others can help you drive the tree wide cleanup. Then we can
enable -Wunreachable-code-break either by default, or W=2 right now
might be a good idea.
Ah, George (gbiv@, cc'ed), did an analysis recently of
`-Wunreachable-code-loop-increment`, `-Wunreachable-code-break`, and
`-Wunreachable-code-return` for Android userspace. From the review:
```
Spoilers: of these, it s...
2011 Nov 30
0
[LLVMdev] -Wunreachable-code and templates
I'm just wondering if anyone's already working on addressing the
current shortcomings around -Wunreachable-code in regards to
templates.
Take the following simple example:
$ cat unreachable.cpp
int func1();
int func2();
template<bool b>
int func() {
return !b ? func1() : func2();
}
int main() {
return func<true>() + func<false>();
}
$ clang++ -Wunreachable-code unreachable....
2019 Nov 22
2
Potential problem with -Wunreachable-code
Hello, hopefully this is the correct place to ask this...
We use distcc with clang++ and I have recently added -Wunreachable-code
to our set of warnings. The problem I am seeing is the compile fails
with (valid) unreachable code warnings on the slave, but passes (no
warning) locally. All machines have the same compiler version
clang version 8.0.1-svn369350-1~exp1~20190820121219.79 (branches/release_80)
Distcc...
2014 May 25
2
replace -Wextra with -W
...0644
--- a/configure.ac
+++ b/configure.ac
@@ -392,8 +392,8 @@ fi
XIPH_GCC_VERSION
if test x$ac_cv_c_compiler_gnu = xyes ; then
- CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Wunreachable-code " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Winline -Wconversion
- CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef -Wunreachable-code " # -Wcast-qual -Wbad-function-cast -W...
2016 Jan 24
1
Wextra in configury
...0644
--- a/configure.ac
+++ b/configure.ac
@@ -380,8 +380,8 @@ fi
XIPH_GCC_VERSION
if test x$ac_cv_c_compiler_gnu = xyes ; then
- CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Wunreachable-code -Winline " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Wconversion
- CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef -Wunreachable-code " # -Wcast-qual -Wbad-function-cast -W...
2014 Jul 26
2
1.21 vs 1.3 encoding speed
...> The difference is: "-g -O2" options were added to CFLAGS.
>
> before:
> CFLAGS = -O3 -funroll-loops -Wall -W -Winline -Wall -Wextra -Wstrict-prototypes
> -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow
> -Wundef -Wmissing-declarations -Wunreachable-code -Wdeclaration-after-statement
> -D_FORTIFY_SOURCE=2 -msse2 -Wextra
>
> after:
> CFLAGS = -O3 -funroll-loops -Wall -W -Winline -g -O2 -Wall -Wextra
> -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align
> -Wnested-externs -Wshadow -Wundef -Wmissing-de...
2014 Jul 26
4
1.21 vs 1.3 encoding speed
Martijn van Beurden wrote:
> op 25-07-14 19:32, Scott Brown schreef:
> > ./configure -enable-static -disable-shared CFLAGS=" -isysroot
> > /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6"
> > make
>
> Well, the use of CFLAGS 'disables' the -O3 and unroll-loops
> optimisation. I'm quite sure that's the culprit. Add -O3 to your
2012 Jan 14
2
[LLVMdev] Unreachable code in Mutex.cpp
...;bool>(pthread_mutex_init);
But that's not what the code does now - the change you made 5 years
ago changed it to a constant:
static const bool pthread_enabled = true;
(I found this because the return outside the 'if (pthread_unabled) {
... return }' was marked as unreachable by -Wunreachable-code). Since
it hasn't actually been doing anything for 5 years - should we just
remove the variable & all the conditions (unconditionally using
pthreads), or reinstate the smarts it used to have (testing the weak
symbol)?
2012 Jan 14
0
[LLVMdev] Unreachable code in Mutex.cpp
...t; But that's not what the code does now - the change you made 5 years
> ago changed it to a constant:
>
> static const bool pthread_enabled = true;
>
> (I found this because the return outside the 'if (pthread_unabled) {
> ... return }' was marked as unreachable by -Wunreachable-code). Since
> it hasn't actually been doing anything for 5 years - should we just
> remove the variable & all the conditions (unconditionally using
> pthreads), or reinstate the smarts it used to have (testing the weak
> symbol)?
Aha, I'm completely fine with constant...
2012 Jan 15
1
[LLVMdev] Unreachable code in Mutex.cpp
...what the code does now - the change you made 5 years
>> ago changed it to a constant:
>>
>> static const bool pthread_enabled = true;
>>
>> (I found this because the return outside the 'if (pthread_unabled) {
>> ... return }' was marked as unreachable by -Wunreachable-code). Since
>> it hasn't actually been doing anything for 5 years - should we just
>> remove the variable & all the conditions (unconditionally using
>> pthreads), or reinstate the smarts it used to have (testing the weak
>> symbol)?
>
> Aha, I'm compl...
2014 May 25
2
extend visibility attributes usage to osx builds
...ndex 6d0fa00..d3c302a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -395,7 +395,6 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Wunreachable-code " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Winline -Wconversion
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef -Wunreachable-code " # -Wcast-qual -Wbad-function-cast -W...
2014 Jul 26
0
1.21 vs 1.3 encoding speed
...before ang after this change.
The difference is: "-g -O2" options were added to CFLAGS.
before:
CFLAGS = -O3 -funroll-loops -Wall -W -Winline -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Wunreachable-code -Wdeclaration-after-statement -D_FORTIFY_SOURCE=2 -msse2 -Wextra
after:
CFLAGS = -O3 -funroll-loops -Wall -W -Winline -g -O2 -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Wunreachable-code...
2014 Jul 26
0
1.21 vs 1.3 encoding speed
...ce is: "-g -O2" options were added to CFLAGS.
>>
>> before:
>> CFLAGS = -O3 -funroll-loops -Wall -W -Winline -Wall -Wextra -Wstrict-prototypes
>> -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow
>> -Wundef -Wmissing-declarations -Wunreachable-code -Wdeclaration-after-statement
>> -D_FORTIFY_SOURCE=2 -msse2 -Wextra
>>
>> after:
>> CFLAGS = -O3 -funroll-loops -Wall -W -Winline -g -O2 -Wall -Wextra
>> -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align
>> -Wnested-externs -Wshad...
2014 Dec 07
2
GCC/clang compilation issues
> Oliver St?neberg wrote:
>
> >
> > > Oliver St?neberg wrote:
> > >
> > > > I finally got around to trying to update FLAC for the MAME/MESS
> > > > project again. There were several issues I was able to fix and will
> > > > submit patches later, but I hit one roadblock with GCC and clang:
> > > >
> > >
2020 Oct 17
1
[Cocci] [RFC] treewide: cleanup unreachable breaks
...ch (see below) or
> > normal patch per file about 100 patches or somewhere half way by collecting
> > early acks.
> >
> > clang has a number of useful, new warnings see
> > https://clang.llvm.org/docs/DiagnosticsReference.html
> >
> > This change cleans up -Wunreachable-code-break
> > https://clang.llvm.org/docs/DiagnosticsReference.html#wunreachable-code-break
> > for 266 of 485 warnings in this week's linux-next, allyesconfig on x86_64.
>
> Early acks/individual patches by subsystem would be good.
> Better still would be an automated...
2020 Oct 17
1
[Cocci] [RFC] treewide: cleanup unreachable breaks
...ch (see below) or
> > normal patch per file about 100 patches or somewhere half way by collecting
> > early acks.
> >
> > clang has a number of useful, new warnings see
> > https://clang.llvm.org/docs/DiagnosticsReference.html
> >
> > This change cleans up -Wunreachable-code-break
> > https://clang.llvm.org/docs/DiagnosticsReference.html#wunreachable-code-break
> > for 266 of 485 warnings in this week's linux-next, allyesconfig on x86_64.
>
> Early acks/individual patches by subsystem would be good.
> Better still would be an automated...
2012 Jan 14
0
[LLVMdev] Unreachable code in Mutex.cpp
On Jan 13, 2012, at 4:43 PM, David Blaikie wrote:
> It looks like for a while now (5 years) some code that was meant to do
> smart things in Mutex.cpp hasn't been doing such smart things:
>
> https://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Mutex.cpp?r1=29287&r2=29932&diff_format=h
>
> I don't know if this change was even deliberate since it came in
2020 Oct 19
0
[RFC] treewide: cleanup unreachable breaks
...able to automate this cleanup, I suggest checking in a
> script that can be run on a directory. Then for each subsystem you
> can say in your commit "I ran scripts/fix_whatever.py on this subdir."
> Then others can help you drive the tree wide cleanup. Then we can
> enable -Wunreachable-code-break either by default, or W=2 right now
> might be a good idea.
I remember using clang-modernize in the past to fix issues very
similar to this, if clang machinery can generate the warning, can't
something like clang-tidy directly generate the patch?
You can send me a patch for...
2014 Dec 07
0
GCC/clang compilation issues
...ure
you that when I'm compiling FLAC in development (ie configured using
"./configure --enable-werror") I am compiling with:
-Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes
-Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef
-Wmissing-declarations -Wunreachable-code -Winline
-Wdeclaration-after-statement -Werror
> Just using
> autoconf or cmake instead of gcc/clang directly doesn't make them
> compiler behave differently - unless you tell them to ;)
Our autotool build system generates at least one header file (config.h,
in the to...
2012 Jan 14
2
[LLVMdev] Unreachable code in Mutex.cpp
It looks like for a while now (5 years) some code that was meant to do
smart things in Mutex.cpp hasn't been doing such smart things:
https://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Mutex.cpp?r1=29287&r2=29932&diff_format=h
I don't know if this change was even deliberate since it came in with
another change & the description doesn't mention it. Should we do