This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR 7776: Warn about if ("abc" < "xyz") ...



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]