------- Additional Comments From falk at debian dot org  2005-03-11 13:28 
-------
(In reply to comment #0)
> # test.c
> static const unsigned major = 0;
> static const unsigned minor = 9;
> static const unsigned build = 1;
> const unsigned version = (major << 24) | (minor << 16) | build;
> 
> # gcc -c test.c
> test.c:4: error: initializer element is not constant
> 
> Hmm, which initializer isn't constant? Do I missed something?

"major", for example, is not a constant expression. It might not make a lot
of sense, but that's the way the C standard defines it.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20426

Reply via email to