public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: "kanishk rastogi" <kanishk.85@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Problem with the string
Date: Fri, 24 Nov 2006 09:56:00 -0000	[thread overview]
Message-ID: <17766.49617.952075.116206@zebedee.pink> (raw)
In-Reply-To: <9ee2fe770611240126t47803b82gc733ae0e7d61b746@mail.gmail.com>

kanishk rastogi writes:
 > hi all,
 > when we compile our c programs the strings which we use get defined in
 > read only memory.
 > how can i ask the gcc compiler to declare them in read-write section.

You just gotta declare them right.  Like this:

char s[] = "This is a string!";

Andrew.

  reply	other threads:[~2006-11-24  9:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-24  9:26 kanishk rastogi
2006-11-24  9:56 ` Andrew Haley [this message]
2006-11-24 10:15   ` kanishk rastogi
2006-11-24 10:18     ` Andrew Haley
2006-11-24 10:21       ` kanishk rastogi
2006-11-24 10:24         ` Andrew Haley
2006-11-24 10:31           ` kanishk rastogi
2006-11-24 10:37             ` Andrew Haley
2006-11-24 11:16               ` kanishk rastogi
2006-11-24 11:31                 ` Andrew Haley
2006-11-24 11:40                   ` kanishk rastogi
2006-11-24 13:33                     ` Andrew Haley
2006-11-24 15:31                       ` Segher Boessenkool
2006-11-24 18:45                 ` John (Eljay) Love-Jensen
2006-11-28  2:57 ` Michael Eager

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=17766.49617.952075.116206@zebedee.pink \
    --to=aph@redhat.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=kanishk.85@gmail.com \
    /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).