This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/29313] New: [middle-end]Possible bogus warning: argument 'type' might be clobbered
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Oct 2006 23:46:20 -0000
- Subject: [Bug c/29313] New: [middle-end]Possible bogus warning: argument 'type' might be clobbered
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This warning occurs for libgfortran/io/list_read.c (list_formatted_read_scalar)
It can be cleared up using the 'volatile' on the argument 'type' shown here.
'type' is never changed anywhere.
static void
list_formatted_read_scalar (st_parameter_dt *dtp, volatile bt type, void *p,
int kind,
size_t size)
{
char c;
int m;
jmp_buf eof_jump;
dtp->u.p.namelist_mode = 0;
dtp->u.p.eof_jump = &eof_jump;
if (setjmp (eof_jump))
{
generate_error (&dtp->common, ERROR_END, NULL);
goto cleanup;
}
--- snip ---
--
Summary: [middle-end]Possible bogus warning: argument 'type'
might be clobbered
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jvdelisle at gcc dot gnu dot org
GCC host triplet: linux-ppc, darwin-ppc, linux-x86-64
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29313