[Bug c++/47734] New: no "comparisons like X<=Y<=Z do not have their mathematical meaning" warning in c++
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47734 Summary: no "comparisons like X<=Y<=Z do not have their mathematical meaning" warning in c++ Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: s...@gnu.org gcc issues a warning comparisons like X<=Y<=Z do not have their mathematical meaning for code like if (-2 < -1 < 0) { } but c++ does not.
[Bug c++/35708] New: jump to label enters catch block
uname -a SunOS neron 5.9 Generic_112233-08 sun4u sparc SUNW,Sun-Fire-480R g++ --version g++ (GCC) 4.2.1 the following program fails with the error === zot.cc = int alloccount = 100; struct object { int one_o; int allocstamp; }; struct gcv_object_t { int one_o; /* Conversion to object. */ operator object () const; /* Conversion from object. */ gcv_object_t (object obj); /* Conversion from fake_gcv_object. */ gcv_object_t (struct fake_gcv_object obj); /* Uninitialized object. */ gcv_object_t (); }; static inline int pgci_pointable (object obj) { return obj.one_o; } static inline int pgci_pointable (gcv_object_t obj) { return obj.one_o; } gcv_object_t STACK[1]; int main (int argc, char *argv[]) { check_rehash_size: { if ((pgci_pointable(STACK[0]) == pgci_pointableobject){one_o:(((int)(int)(((0 << 3) + 7UL)) << 0) + ((int)(int)(0) << 7)), allocstamp: alloccount}) { bad_rehash_size: goto check_rehash_size; } goto bad_rehash_size; } } === zot.cc = $ g++ -c zot.cc zot.cc: In function 'int main(int, char**)': zot.cc:30: error: jump to label 'bad_rehash_size' zot.cc:33: error: from here zot.cc:29: error: enters catch block I don't see any catch blocks here. thanks. -- Summary: jump to label enters catch block Product: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sds at gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35708
[Bug c++/35708] jump to label enters catch block
--- Comment #2 from sds at gnu dot org 2008-03-26 20:44 --- so? the objects are created, used and discarded on the fly. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35708
[Bug c/19881] New: strange warning about alloca
the following file = foo.c #include #include #include extern void bar (char*, char*); void foo (const char *name, const char *type) { { size_t name_len = strlen (name); char *name_temp = (char *) alloca (name_len); if (name_len > 0) memcpy (name_temp, name, name_len); { char name_copy[name_len + 2]; memcpy (name_copy, name_temp, name_len); name_copy[name_len] = '$'; name_copy[name_len + 1] = '\0'; { size_t type_len = strlen (type); char *type_temp = (char *) alloca (type_len); if (type_len > 0) memcpy (type_temp, type, type_len); { char type_copy[type_len + 2]; memcpy (type_copy, type_temp, type_len); type_copy[type_len] = '$'; type_copy[type_len + 1] = '\0'; { bar (name_copy, type_copy); } } } } } } = foo.c produces this warning: $ gcc -c foo.c foo.c: In function `foo': foo.c:21: warning: alloca()ed storage released along with dynamically-sized auto objects on this system: "gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)" -- Summary: strange warning about alloca Product: gcc Version: 3.4.2 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sds at gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19881
[Bug c/19881] strange warning about alloca
-- What|Removed |Added CC||bruno at clisp dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19881
[Bug middle-end/14236] dynamically-sized arrays break alloca()
--- Additional Comments From sds at gnu dot org 2005-02-10 21:13 --- (In reply to comment #3) > Well, yes, it is documented, but that doesn't make it right (although I know > people that will qualify documented bugs as features :-). IMHO, it's still > wrong, especially now that variable-length arrays are standard. Sure, alloca > is > non-standard, but it still doesn't feel right. why is this not right? I find this perfectly natural. -- What|Removed |Added CC||bruno at clisp dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14236
[Bug middle-end/14236] dynamically-sized arrays break alloca()
--- Additional Comments From sds at gnu dot org 2005-02-14 17:47 --- (In reply to comment #9) > - memory allocated with alloca() is released at the time the function that > calls > alloca() returns oh - I didn't know that. I always thought that alloca()ted memory is released by the next "}". (i.e., identical to dynamic arrays). Thanks for the clarification. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14236