public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mishabear at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/25151] GCC issues warnings to a syntactically correct expression.
Date: Tue, 29 Nov 2005 07:44:00 -0000	[thread overview]
Message-ID: <20051129074451.3170.qmail@sourceware.org> (raw)
In-Reply-To: <bug-25151-11784@http.gcc.gnu.org/bugzilla/>



------- Comment #2 from mishabear at gmail dot com  2005-11-29 07:44 -------
Subject: Re:  GCC issues warnings to a syntactically correct expression.

In fact I want to do something lik this:
int main()
{
        int ia[10];
        int *pi, i;

        i=10;
        pi = ( ((i>=0) && (i<10)) ? (pi=&(ia[i]), i=(i+1)%10, pi) : (pi=0) );
        return 0;
}

and I don't think there are any semantical problems.

29 Nov 2005 06:28:10 -0000, pinskia at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org>:
>
>
> ------- Comment #1 from pinskia at gcc dot gnu dot org  2005-11-29 06:28 -------
> Note the warning is to warn things like:
> a = a++;
> which is syntactically correct but semantically questionable.
>
> Note there are a lot of things which are syntactially correct but are
> semantically questionable
>
>
> --
>
> pinskia at gcc dot gnu dot org changed:
>
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>           Keywords|                            |diagnostic
>      Known to fail|                            |4.0.3
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25151
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25151


  parent reply	other threads:[~2005-11-29  7:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-29  6:14 [Bug c/25151] New: " mishabear at gmail dot com
2005-11-29  6:28 ` [Bug c/25151] " pinskia at gcc dot gnu dot org
2005-11-29  7:44 ` mishabear at gmail dot com [this message]
2006-09-18  1:38 ` pinskia at gcc dot gnu dot org

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=20051129074451.3170.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).