This is the mail archive of the gcc-bugs@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]

[Bug c++/14075] New: ("foo") accepted as char[] initializer


The following code should not be accepted according to what I understand from 
section 8.5.2 in the latest standard edition I could find: 
 
int main() 
{ 
  const char s[] = ("foo"); 
} 
 
HP's aCC throws an "Illegal initializer" error on this one for example. 
 
Note that this report is similar to #11250. This time it's about the C++ 
frontend, though. 
 
Harri.

-- 
           Summary: ("foo") accepted as char[] initializer
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: porten at kde dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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