This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/54823] string literal characters not constant
- From: "devel at fresse dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 05 Oct 2012 11:46:20 +0000
- Subject: [Bug c/54823] string literal characters not constant
- Auto-submitted: auto-generated
- References: <bug-54823-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54823
--- Comment #3 from Sebastian Freundt <devel at fresse dot org> 2012-10-05 11:46:20 UTC ---
I'm more or less referring to the internals, why is it a constant expression in
the first case, but not treated as an integer constant expression.
Also, according to the rules of indirection (6.5.3.2):
If [a string literal X] has type "pointer to TYPE" then *X should have type X.
Now if internally *" " is a integer (or char) internally, and taking the rules
of indirection literally, then
enum {foo = *" "};
should be (in my eyes) the same as
enum {foo = (char)32};