From: Christoph S. <cs...@fr...> - 2009-04-22 06:07:21
|
On Tue, Apr 21, 2009 at 12:57:07PM -0400, Divya Krishnan wrote: > Basically if my input is: > int c[10]; > I want my output to be > volatile int c[10]; We may not like it, but for a C-compiler the order of the type modifier and the type identifier does not matter. You want an array of volatile integers, don't you? Not a volatile pointer to an array of integers. > --- snip --- > However this gives output as > int ( volatile c)[9] ; My gcc (4.3.2) does not like the parenthesis: type-qualifiers.c:1: error: expected identifier or `(' before `volatile' Given the code the error message sounds like a corny joke just as helpful as "Keyboard error. Press <F1> to continue." /cls -- Dr. Christoph L. Spiel Don't fix it if it ain't broken, don't break it if you can't fix it. |