This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/24015] Wrong code generated when using optimizer
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Sep 2005 17:07:01 -0000
- Subject: [Bug middle-end/24015] Wrong code generated when using optimizer
- References: <20050922161116.24015.buergel@limmat.ch>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-22 17:06 -------
(In reply to comment #6)
> Hello and thanks for the quick answer! Yes it does! But: I am not getting the
> warning: operation on `data' may be undefined
>
> when using gcc 3.4.4 and -Wall.
Try at -O0, glibc changes tolower to a macro which causes issues with the warning, I will file another
bug about that soon.
The short testcase for your issue would be:
#include <ctype.h>
void strtolower(char *data) { while (*data != '\0') *data++ = tolower(*data); }
*** This bug has been marked as a duplicate of 11751 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24015