public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/21486] New: C Compiler does NOT signal anything when there is an increment of char * without target variable
@ 2005-05-10 10:53 frans at iunknown dot org
2005-05-10 12:05 ` [Bug c/21486] " schwab at suse dot de
0 siblings, 1 reply; 2+ messages in thread
From: frans at iunknown dot org @ 2005-05-10 10:53 UTC (permalink / raw)
To: gcc-bugs
This simple source code:
#include <stdio.h>
main()
{
char *p;
p+21;
return 1;
}
does NOT cause the gcc compiler to warn or signal any error. Pointer p remains
the same, before and after the 'strange' increment.
If the compiler does not signal anything about that, in a large source code it's
a very hard task to find where the problem is.
--
Summary: C Compiler does NOT signal anything when there is an
increment of char * without target variable
Product: gcc
Version: 3.3.4
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: frans at iunknown dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21486
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c/21486] C Compiler does NOT signal anything when there is an increment of char * without target variable
2005-05-10 10:53 [Bug c/21486] New: C Compiler does NOT signal anything when there is an increment of char * without target variable frans at iunknown dot org
@ 2005-05-10 12:05 ` schwab at suse dot de
0 siblings, 0 replies; 2+ messages in thread
From: schwab at suse dot de @ 2005-05-10 12:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From schwab at suse dot de 2005-05-10 12:04 -------
$ gcc -Wall simple.c
simple.c:4: warning: return type defaults to ‘int’
simple.c: In function ‘main’:
simple.c:7: warning: statement with no effect
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21486
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-10 12:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-10 10:53 [Bug c/21486] New: C Compiler does NOT signal anything when there is an increment of char * without target variable frans at iunknown dot org
2005-05-10 12:05 ` [Bug c/21486] " schwab at suse dot de
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).