1/* Process declarations and variables for C++ compiler. 2 Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 3 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 4 Contributed by Michael Tiemann (tiemann@cygnus.com) 5 6This file is part of GCC. 7 8GCC is free software; you can redistribute it and/or modify --- 6688 unchanged lines hidden (view full) --- 6697 /* `(int) &fn' is not a valid array bound. */ 6698 if (name) 6699 error ("size of array %qD is not an integral constant-expression", 6700 name); 6701 else 6702 error ("size of array is not an integral constant-expression"); 6703 size = integer_one_node; 6704 } |
6705 else if (pedantic && warn_vla != 0) |
6706 { 6707 if (name) |
6708 pedwarn ("ISO C++ forbids variable length array %qD", name); |
6709 else |
6710 pedwarn ("ISO C++ forbids variable length array"); |
6711 } |
6712 else if (warn_vla > 0) 6713 { 6714 if (name) 6715 warning (OPT_Wvla, 6716 "variable length array %qD is used", name); 6717 else 6718 warning (OPT_Wvla, 6719 "variable length array is used"); 6720 } |
6721 6722 if (processing_template_decl && !TREE_CONSTANT (size)) 6723 /* A variable sized array. */ 6724 itype = build_min (MINUS_EXPR, sizetype, size, integer_one_node); 6725 else 6726 { 6727 HOST_WIDE_INT saved_processing_template_decl; 6728 --- 5042 unchanged lines hidden --- |