This is the mail archive of the
mailing list for the GCC project.
Missing warning opportunity - code after break;
- From: Soul Studios <matt at soulstudios dot co dot nz>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 20 Jun 2017 14:37:13 +1200
- Subject: Missing warning opportunity - code after break;
- Authentication-results: sourceware.org; auth=none
Just noticed this:
if (num_elements == 0)
doesn't trigger a warning in GCC 5.1, 6.3 and 7.1. The line after
"break;" is unused, probably should be before the break, ie. user error.