This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR 7776: Warn about if ("abc" < "xyz") ...
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Paul Schlie <schlie at comcast dot net>
- Cc: <gcc-patches at gcc dot gnu dot org>, Roger Sayle <roger at eyesopen dot com>
- Date: Sun, 5 Jun 2005 13:59:02 -0400
- Subject: Re: [PATCH] PR 7776: Warn about if ("abc" < "xyz") ...
- References: <BEC8B41B.A627%schlie@comcast.net>
On Jun 5, 2005, at 1:52 PM, Paul Schlie wrote:
- (char []){'a','b','c', 0} // which is equivelent to a string literal.
No this is equivalent to a string literal. This is an anonymous variable
which is an array.
- &'a' or &(<sometype>)some_literal_value
Both invalid C.
- (some_struct_or_array){some_literal, ...}
Again this is an anonymous variable and nothing else.
Please read the C standard more carefully.
Thanks,
Andrew Pinski