assumption.
* g++.dg/ipa/pr51759.C: Fix assumption sizeof(int) > 2.
* gcc.dg/cpp/warn-multichar.c: Fix to work on int=16 platforms.
* gcc.dg/cpp/warn-multichar-2.c: Ditto.
* gcc.dg/debug/dwarf2/pr49871.c: Add dg-require-effective-target
int32plus because of big array needed.
* gcc.dg/pr50527.c: Don't FAIL if sizeof(void*) = 2
* gcc.dg/lto/
20090218-2_1.c: Fix prototype of malloc, memcpy.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183158
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-01-13 Georg-Johann Lay <avr@gjlay.de>
+
+ * gcc.c-torture/execute/20120111-1.c: Fix wrong int = int32_t
+ assumption.
+ * g++.dg/ipa/pr51759.C: Fix assumption sizeof(int) > 2.
+ * gcc.dg/cpp/warn-multichar.c: Fix to work on int=16 platforms.
+ * gcc.dg/cpp/warn-multichar-2.c: Ditto.
+ * gcc.dg/debug/dwarf2/pr49871.c: Add dg-require-effective-target
+ int32plus because of big array needed.
+ * gcc.dg/pr50527.c: Don't FAIL if sizeof(void*) = 2
+ * gcc.dg/lto/20090218-2_1.c: Fix prototype of malloc, memcpy.
+
2012-01-13 Jason Merrill <jason@redhat.com>
PR c++/51813
/* { dg-do run } */
/* { dg-options "-O2" } */
+#if __SIZEOF_INT__ == 2 && __SIZEOF_LONG__ == 4
+#define unsigned unsigned long
+#endif
+
extern "C" void abort (void);
struct S
{
uint32_t
f0a (uint64_t arg)
{
- return ~(arg > -3);
+ return ~((unsigned) (arg > -3));
}
int main() {
// { dg-do preprocess }
// { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=multichar" }
/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
-#if 'abc' // { dg-error "multi-character character constant .-Werror=multichar." }
+#if 'ab' // { dg-error "multi-character character constant .-Werror=multichar." }
#endif
// { dg-do preprocess }
// { dg-options "-std=gnu99 -fdiagnostics-show-option -Wmultichar" }
-#if 'abc' // { dg-warning "multi-character character constant .-Wmultichar." }
+#if 'ab' // { dg-warning "multi-character character constant .-Wmultichar." }
#endif
{
return 0;
}
-void *malloc(unsigned long size);
-void *memcpy(void *dest, const void *src, unsigned long n);
+void *malloc(__SIZE_TYPE__ size);
+void *memcpy(void *dest, const void *src, __SIZE_TYPE__ n);
static mem_attrs * get_mem_attrs () {
void **slot;
*slot = malloc (3);
/* { dg-do run } */
-/* { dg-options "-Os --param large-stack-frame=30" } */
+/* { dg-options "-Os --param large-stack-frame=30 -Wno-pointer-to-int-cast" } */
extern void abort (void);