Thiago Adams

Results 69 issues of Thiago Adams

It is necessary to review semantics of each operator. I did this for addition-expression only.

With this sample ```c int main() { int a5[5]; auto a[3] = &a5; } ``` GCC emits error: 'auto' requires a plain identifier, possibly with attributes, as declarator Cake generates...

I was reading this doc https://learn.microsoft.com/en-us/cpp/preprocessor/preprocessor-experimental-overview?source=recommendations&view=msvc-170 and found the same problem in cake preprocessor for the following item "Rescanning replacement list for macros" ```c #define CAT(a,b) a ## b #define...

```c struct X{ int b[sizeof(struct X)]; }; int main(){} ``` Should be an error.

```c #pragma safety enable struct X { _Out char* s; //must be an error }; void f(_Out int i); //error //only for pointer to something _Out //this includes arrays void...

```c #pragma safety enable void f(int i) { int a=0; int b=1; int* k =i ? &a : &b; //pointer k is pointing to a or b (cake is not...

Cake should do ```c _Bool b = expression; ``` ```c unsigned char b = !!(expression); ```

```c #pragma safety enable void* _Owner _Opt malloc(unsigned long size); void free(void* _Owner _Opt ptr); void f(bool condition) { void * _Owner _Opt p = malloc(1); if (condition) { void...

```c #pragma safety enable int main() { for (int i = 0; i < 10; i++) { if (i != 0) //warning i always 0 { } } } ```