public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29905] New: double const not const anymore.
@ 2006-11-20 6:47 carlo at gcc dot gnu dot org
2006-11-20 7:05 ` [Bug c++/29905] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: carlo at gcc dot gnu dot org @ 2006-11-20 6:47 UTC (permalink / raw)
To: gcc-bugs
This used to work fine with version 3.x
double const d = 4.3;
int const c = (int)d;
int a[c];
>g++-svn-4.3 -v -c troep2.cc
Using built-in specs.
Target: i686-cw-linux-gnu
Configured with: /usr/src/gcc/gcc-svn-4.2/configure
--prefix=/usr/local/gcc-svn-4.2 --enable-shared --with-gnu-as --with-gnu-ld
--enable-languages=c++ --enable-debug --enable-threads=posix --disable-checking
--with-system-zlib --enable-__cxa_atexit --host=i686-cw-linux-gnu
Thread model: posix
gcc version 4.3.0 20061108 (experimental)
/usr/local/gcc-svn-4.3/bin/../libexec/gcc/i686-cw-linux-gnu/4.3.0/cc1plus
-quiet -v -iprefix
/usr/local/gcc-svn-4.3/bin/../lib/gcc/i686-cw-linux-gnu/4.3.0/ -D_GNU_SOURCE
troep2.cc -quiet -dumpbase troep2.cc -mtune=generic -auxbase troep2 -version -o
/tmp/ccrbQmdj.s
ignoring nonexistent directory
"/usr/local/gcc-svn-4.3/bin/../lib/gcc/i686-cw-linux-gnu/4.3.0/../../../../i686-cw-linux-gnu/include"
ignoring nonexistent directory
"/usr/local/gcc-svn-4.2/lib/gcc/i686-cw-linux-gnu/../../../include/c++/4.3.0"
ignoring nonexistent directory
"/usr/local/gcc-svn-4.2/lib/gcc/i686-cw-linux-gnu/../../../include/c++/4.3.0/i686-cw-linux-gnu"
ignoring nonexistent directory
"/usr/local/gcc-svn-4.2/lib/gcc/i686-cw-linux-gnu/../../../include/c++/4.3.0/backward"
ignoring nonexistent directory
"/usr/local/gcc-svn-4.2/lib/gcc/i686-cw-linux-gnu/4.3.0/include"
ignoring nonexistent directory
"/usr/local/gcc-svn-4.2/lib/gcc/i686-cw-linux-gnu/../../../i686-cw-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/gcc-svn-4.3/bin/../lib/gcc/i686-cw-linux-gnu/4.3.0/../../../../include/c++/4.3.0
/usr/local/gcc-svn-4.3/bin/../lib/gcc/i686-cw-linux-gnu/4.3.0/../../../../include/c++/4.3.0/i686-cw-linux-gnu
/usr/local/gcc-svn-4.3/bin/../lib/gcc/i686-cw-linux-gnu/4.3.0/../../../../include/c++/4.3.0/backward
/usr/local/gcc-svn-4.3/bin/../lib/gcc/i686-cw-linux-gnu/4.3.0/include
/usr/local/include
/usr/local/gcc-svn-4.2/include
/usr/include
End of search list.
GNU C++ version 4.3.0 20061108 (experimental) (i686-cw-linux-gnu)
compiled by GNU C version 4.3.0 20061108 (experimental).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129595
Compiler executable checksum: 5a6b66f3bef6583a263c989adde4d3fa
troep2.cc:3: error: array bound is not an integer constant
Every 4.x version gives the same error.
I really don't like this, because I have code that depends
heavily on computations with double during *compile time*.
If the above means that all those calculations are postponed
to runtime :/ Why?
I really hope this is a bug.
--
Summary: double const not const anymore.
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: carlo at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29905
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/29905] double const not const anymore.
2006-11-20 6:47 [Bug c++/29905] New: double const not const anymore carlo at gcc dot gnu dot org
@ 2006-11-20 7:05 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-11-20 7:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-11-20 07:05 -------
The C++ standard says this is not an intergal constant.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29905
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-20 7:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-20 6:47 [Bug c++/29905] New: double const not const anymore carlo at gcc dot gnu dot org
2006-11-20 7:05 ` [Bug c++/29905] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).