🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.c
Article #750

Re: 質問です

#750
From: uehara
Date: Tue, 17 Feb 1998 00:00
39 lines
1980 bytes
In article <6cb01g$21c$1@news.cc.nagoya-u.ac.jp> shibuya <94sibuya@hod.nuap.nagoya-u.ac.jp> writes:
  > マイクロソフトのVisual C++ 4.0 には、
  > 「リテラル文字列は静的でなくブロックスコープ内のみ
  > で有効であるが、Visual C++は独自仕様として静的領域に
  > 確保する」
  > という旨のことが書いてありましたが、本当の所は静的
  > なのかそうでないのか、どっちなんでしょうか?

ANSI Cの仕様書には、

  3.1.4 String literals
  Semantics

    A character string literal has static storage duration and type
   ``array of char ,'' and is initialized with the given characters.

とあるし、ISO C++のCD2文書にも

  2.13.4  String literals

  1 ...
    An ordinary string literal has type "array of n const
    char"  and  static storage duration (_basic.stc_), 

とありますね。さらにいうと、VC4のオンラインヘルプでは

「リテラル文字列は静的でなくブロックスコープ内のみ
  で有効であるが、Visual C++は独自仕様として静的領域に
  確保する」

なる記述は見つけられませんでした。どこらへんに
書いてあったのでしょうか?

--
  N     ニュービジネス事業本部第2プロジェクト 上原 潤二
 TT    EMAIL: uehara@po.ntts.co.jp         〒:231-8554
S◯F   TEL: 045-212-7574             FAX: 045-212-7509
  T
Technical Details
Message-ID: <UEHARA.98Feb17142533@gate.po.ntts.co.jp>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6ca43a$c7v$1@news.twin.ne.jp> <UEHARA.98Feb17104458@gate.po.ntts.co.jp> <6cb01g$21c$1@news.cc.nagoya-u.ac.jp>

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: 106434,200412f6fe640ef9
X-Google-Attributes: gid106434,public
From: uehara@po.ntts.co.jp
Subject: Re: 質問です
Date: 1998/02/17
Message-ID: <UEHARA.98Feb17142533@gate.po.ntts.co.jp>
X-Deja-AN: 325785624
References: <6ca43a$c7v$1@news.twin.ne.jp> <UEHARA.98Feb17104458@gate.po.ntts.co.jp> <6cb01g$21c$1@news.cc.nagoya-u.ac.jp>
Mime-Version: 1.0 (generated by tm-edit 7.105)
Content-Type: text/plain; charset=ISO-2022-JP
Organization: NTT Software Corp. Yokohama, Japan.
Newsgroups: fj.lang.c