public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Christian Ehrhardt" <ehrhardt@mathematik.uni-ulm.de>
To: Jan-Benedict Glaw <jbglaw@lug-owl.de>
Cc: gcc@gcc.gnu.org
Subject: Re: To const or not to const...
Date: Thu, 20 Feb 2003 16:21:00 -0000	[thread overview]
Message-ID: <20030220142705.22460.qmail@thales.mathematik.uni-ulm.de> (raw)
In-Reply-To: <20030220140211.GU351@lug-owl.de>

On Thu, Feb 20, 2003 at 03:02:11PM +0100, Jan-Benedict Glaw wrote:
> int main() {
> 	int b = "again_hello"[5]; /* #2 */
> 	return 0;
> }
> 
> 
> Assignment #2 is okay from GCC's eyes, but #1 isn't:

This is because in the case of #2 the initializer need not be constant
because the initialization takes place inside a function.

   regards  Christian

-- 
THAT'S ALL FOLKS!

  reply	other threads:[~2003-02-20 14:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-20 14:27 Jan-Benedict Glaw
2003-02-20 16:21 ` Christian Ehrhardt [this message]
2003-02-20 16:24   ` Jan-Benedict Glaw
2003-02-20 17:57     ` Nathan Sidwell
2003-02-20 18:27       ` Jan-Benedict Glaw
2003-02-20 20:20         ` Joseph S. Myers

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=20030220142705.22460.qmail@thales.mathematik.uni-ulm.de \
    --to=ehrhardt@mathematik.uni-ulm.de \
    --cc=gcc@gcc.gnu.org \
    --cc=jbglaw@lug-owl.de \
    /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).