--- In [email protected], "izecksohn" <izecks...@...> wrote:
>
>   I know the title does not work, but: Should it compile?

It's generally preferred that you put the whole question in
the body, rather than referring readers to the title.

  Re: const char const string[] = "Hello ";

>   gcc does not warn about it,

You must have the warnings set low. [-W -Wall is not sufficient.]

  % type title.c
  const char const string[] = "Hello ";
  
  % gcc -ansi -pedantic-errors -c title.c
  title.c:1: error: duplicate 'const'
    
  % 

> while dmc refuses to compile it.
> 
>   Could you cite ISO/IEC 9899:1999 (E) ?

6.7.3p4 "If the same qualifier appears more than once in the
same specifier-qualifier-list, either directly or via one or
more typedefs, the behavior is the same as if it appeared
only once."

But that's C99. My C90 draft says...

  Constraints
  
     The same type qualifier shall not appear more than once in
  the same specifier list or qualifier list, either directly or
  via one or more typedef s.

-- 
Peter

Reply via email to