: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: izaberina at gmail dot com
Target Milestone: ---
Created attachment 61092
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61092&action=edit
the horrible code in question
so i wrote some horrible code
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: izaberina at gmail dot com
Target Milestone: ---
c version https://godbolt.org/z/z3v1W3njb
c++ version https://godbolt.org/z/T3cns6rPe
i need countbar to save rdi, and any registers used by
++
Assignee: unassigned at gcc dot gnu.org
Reporter: izaberina at gmail dot com
Target Milestone: ---
Created attachment 53472
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53472&action=edit
short repro
Attached is a small reproducer of something that originally came fro
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83397
--- Comment #1 from Isabella ---
int a;
static void __attribute__((noinline)) f1() { a = 7; }
void g1(void) { f1(); }
static void __attribute__((noinline)) f2(void) { a = 7; }
void g2(void) { f2(); }
gets compiled to
f1:
movl $7, a(%rip)
Assignee: unassigned at gcc dot gnu.org
Reporter: izaberina at gmail dot com
Target Milestone: ---
https://godbolt.org/g/8ZcWKk
according to c11 6.7.6.3, function prototypes without arguments don't specify
anything about their parameters
gcc is assuming that f1 takes an unspec
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: izaberina at gmail dot com
Target Milestone: ---
gcc -Os compiles this function
void myfree(void *mem) {
if (mem)
free(mem);
}
to
myfree(void*):
testrdi, rdi
: unassigned at gcc dot gnu.org
Reporter: izaberina at gmail dot com
Target Milestone: ---
int main() {
int a = 1, b = 2, c = 3, d = 4;
if (a = 2 || (b != 3 &&
c != 4 && d != 5)) return 1;
return 0;
}
-Wparentheses produces the following warni
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: izaberina at gmail dot com
Target Milestone: ---
$ cat wswitch.c
#include
typedef enum { a, b, c, d, e } letter;
letter func (int arg) {
if (arg > 0) return a;
retur
: unassigned at gcc dot gnu.org
Reporter: izaberina at gmail dot com
Target Milestone: ---
I'm on arch linux on x86_64, using gcc 5.3.0.
From this code:
char tape[65536];
void f() {
tape[0] = 0;
tape[1] = 0;
tape[2] = 0;
tape[3] = 0;
tape[4] = 0;
tape[5