Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22004

Can GCC for ARM flag this as a warning: A != B;

$
0
0

Recently, I was doing a review of some of my code and I found two instances where I mistakenly typed != instead of |=.

I was of the opinion that GCC might issue a warning for a non-executable instruction as A != B;

I say non-executable because != is not an assignment operator but a logical operator.

Is there an option that can flag this type of dumb mistake?

I don't know how the code worked properly since I was setting some bits that controlled flash programming -- luckily I caught it.

Thanks


Viewing all articles
Browse latest Browse all 22004

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>