delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2007/04/18/11:22:26

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Rod Pemberton" <do_not_have AT bitfoad DOT cmm>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: gcc bug?
Date: Tue, 17 Apr 2007 02:55:41 -0400
Organization: Aioe.org NNTP Server
Lines: 28
Message-ID: <f01r0r$59u$1@aioe.org>
References: <LbadnVsa3_H-ornbnZ2dnUVZ_sudnZ2d AT comcast DOT com>
NNTP-Posting-Host: IVw7K97ih4IohxRqyKkqFw.user.aioe.org
X-Complaints-To: abuse AT aioe DOT org
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MSMail-Priority: Normal
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Alexei A. Frounze" <alexfru AT chat DOT ru> wrote in message
news:LbadnVsa3_H-ornbnZ2dnUVZ_sudnZ2d AT comcast DOT com...
> I was checking my understanding of volatile's effect and encountered an
odd
> thing.
>

I'm _really_ unsure about this...  The "warning flag" for me are the
additional qualifiers on a type that's already been typedef'd (Is that
legal?  Seems to work...except for...).  I.e., are your volatile's in the
correct location?  You want the pointer to be volatile not the struct,
right?

> Consider the following code:
> ----8<----
> typedef struct {char x;} T, *PT;
>
> void f1 ()
> {
>   volatile T* pt = 0;

T* volatile pt = 0;


Rod Pemberton


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019