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/46028] Regression from GCC 4.4: "storage size of 'test_array' isn't constant"


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

philipp at marek dot priv.at changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |philipp at marek dot
                   |                            |priv.at

--- Comment #4 from philipp at marek dot priv.at 2011-03-14 10:37:15 UTC ---
This fails, too: "error: storage size of âsvâ isnât constant"

int main(void)
{
    const int len = 20;
    static char sv[len];
}



Similarly, gcc 4.4 accepted 

  #define CONST_STRING "aaa"
  static char x[strlen(CONST_STRING)];

but gcc-4.5 does not.
(Of course, I could overload "strlen" ... but whether that's enough reason to
reject that?)


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