Click here to Skip to main content
15,904,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OLESTR Pin
George_George1-Apr-08 23:13
George_George1-Apr-08 23:13 
GeneralRe: OLESTR Pin
toxcct1-Apr-08 23:17
toxcct1-Apr-08 23:17 
GeneralRe: OLESTR Pin
George_George1-Apr-08 23:29
George_George1-Apr-08 23:29 
GeneralRe: OLESTR Pin
toxcct1-Apr-08 23:32
toxcct1-Apr-08 23:32 
GeneralRe: OLESTR Pin
George_George1-Apr-08 23:58
George_George1-Apr-08 23:58 
GeneralRe: OLESTR Pin
CPallini2-Apr-08 2:01
mveCPallini2-Apr-08 2:01 
GeneralRe: OLESTR Pin
George_George2-Apr-08 2:07
George_George2-Apr-08 2:07 
GeneralRe: OLESTR Pin
CPallini2-Apr-08 2:28
mveCPallini2-Apr-08 2:28 
George_George wrote:
Do you have any documents support this claim? Even if we turn off string pooling?

C++ specifications? See below.

George_George wrote:
I read your referred article, I think it has nothing to do with OLESTR, but dealing with write to const data? Right?

You're wrong.
First of all OLESTR are string literals [^].
Have you read "Const Storage and String Literals" section, it reports the following excerpt:
The C++ standard (section lex.string) states:

    1 A  string  literal  is  a  sequence  of  characters  (as  defined   in
      _lex.ccon_) surrounded by double quotes, optionally beginning with the
      letter L, as in "..." or L"...".  A string literal that does not begin
      with  L  is  an  ordinary string literal, also referred to as a narrow
      string literal.  An ordinary string literal has type "array of n const
      char"  and  static storage duration [...] 

Static storage duration means that memory for literals is allocated when the program begins running and is freed when the program terminates.

Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke


GeneralRe: OLESTR Pin
George_George2-Apr-08 2:58
George_George2-Apr-08 2:58 
GeneralRe: OLESTR Pin
CPallini2-Apr-08 3:00
mveCPallini2-Apr-08 3:00 
GeneralRe: OLESTR Pin
George_George2-Apr-08 3:14
George_George2-Apr-08 3:14 
GeneralRe: OLESTR Pin
Stephen Hewitt2-Apr-08 16:24
Stephen Hewitt2-Apr-08 16:24 
GeneralRe: OLESTR Pin
George_George3-Apr-08 0:17
George_George3-Apr-08 0:17 
GeneralRe: OLESTR Pin
Stephen Hewitt6-Apr-08 14:58
Stephen Hewitt6-Apr-08 14:58 
GeneralRe: OLESTR Pin
George_George6-Apr-08 17:08
George_George6-Apr-08 17:08 
GeneralRe: OLESTR Pin
Hamid_RT7-Apr-08 3:42
Hamid_RT7-Apr-08 3:42 
GeneralRe: OLESTR Pin
George_George7-Apr-08 3:58
George_George7-Apr-08 3:58 
GeneralRe: OLESTR Pin
Hamid_RT7-Apr-08 4:12
Hamid_RT7-Apr-08 4:12 
GeneralRe: OLESTR Pin
George_George7-Apr-08 4:16
George_George7-Apr-08 4:16 
GeneralRe: OLESTR Pin
Hamid_RT7-Apr-08 4:28
Hamid_RT7-Apr-08 4:28 
Generalstatic library in two modules Pin
code_discuss1-Apr-08 20:10
code_discuss1-Apr-08 20:10 
QuestionRe: static library in two modules Pin
Rajkumar R1-Apr-08 22:47
Rajkumar R1-Apr-08 22:47 
GeneralRe: static library in two modules Pin
code_discuss2-Apr-08 14:44
code_discuss2-Apr-08 14:44 
GeneralRe: static library in two modules Pin
Mark Salsbery2-Apr-08 6:24
Mark Salsbery2-Apr-08 6:24 
GeneralEditor Pin
suhi1-Apr-08 20:02
suhi1-Apr-08 20:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.