updated gitignore and blocs

This commit is contained in:
Raphaël LACROIX 2023-04-18 11:44:32 +02:00
parent 5d0902c868
commit ced95f1a97
4 changed files with 8 additions and 8 deletions

4
.gitignore vendored
View file

@ -3,4 +3,6 @@
out
yacc.tab.c
yacc.tab.h
yacc.output
yacc.output
testFile
testFile.old

View file

@ -16,7 +16,7 @@
int labelCount = 0;
char* getNextLabel(){
char label[NAME_MAX_LENGTH];
char label[LABEL_MAX_LENGTH];
sprintf(label, "%d_LABEL", labelCount);
}

View file

@ -6,7 +6,7 @@
#define PROJET_SYSTEMES_INFORMATIQUES_BLOCS_H
int labelCount;
#define NAME_MAX_LENGTH 20
#define LABEL_MAX_LENGTH 20
#endif //PROJET_SYSTEMES_INFORMATIQUES_BLOCS_H

View file

@ -1,15 +1,13 @@
int compute(int a, int d) {
int b;
int c;
b = a;
while (c > 0) {
b = b + a * 4;
}
b = b + a * 4;
return b;
}
void main(int a) {
void main(void) {
int a;
if (a == 3) {
print(a);