public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Steve Kargl <sgk@troutmask.apl.washington.edu>
To: Anton Shterenlikht <mexas@bris.ac.uk>
Cc: fortran@gcc.gnu.org
Subject: Re: false -Wmaybe-uninitialized?
Date: Fri, 27 Nov 2015 17:04:00 -0000	[thread overview]
Message-ID: <20151127170400.GA76158@troutmask.apl.washington.edu> (raw)
In-Reply-To: <201511270953.tAR9r5T7043310@mech-as222.men.bris.ac.uk>

On Fri, Nov 27, 2015 at 01:53:06AM -0800, Anton Shterenlikht wrote:
> $ cat z.f90 
> character(:), allocatable :: z
> z = "mumu"
> end
> 
> $ gfortran -Wall z.f90
> z.f90:2:0:
> 
>  z = "mumu"
>  ^
> Warning: '.z' may be used uninitialized in this function [-Wmaybe-uninitialized]
> $ 
> 
> Is this warning appropriate here?

Of course not.

> Is this statement not initialisation?


Of course it is.  You'll note that warning has '.z'
not 'z'.  '.z' is is part of its internal representation.
Use -Wno-maybe-unitialized.

-- 
Steve

  reply	other threads:[~2015-11-27 17:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27  9:53 Anton Shterenlikht
2015-11-27 17:04 ` Steve Kargl [this message]
2015-11-27 19:05 Dominique d'Humières

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151127170400.GA76158@troutmask.apl.washington.edu \
    --to=sgk@troutmask.apl.washington.edu \
    --cc=fortran@gcc.gnu.org \
    --cc=mexas@bris.ac.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).