C language > Expert questions

Convolution function

<< < (3/3)

Grincheux:
You seem to right, but in this case one can consider a bug into any compiler that accept local and parameters variable to begin with an underscore. I have seen many C grammars, it is not forbidden to use the underscore anywhere in the variable name.

I thought that it was link any other character. In my mind when I have a variable "_Toto" the compiler must create "__Toto".
And when I have a "__Toto" variable it becomes "___Toto".

That is only valid for external variables, when there is no external variables defined, the syntax is accepted.

I don't want the war.
I like that kind of discuss because it is possible to learn many things.


But the problem I had was not caused by the syntax, for me it was a bug.


Thank You Frankie. ;D

frankie:

--- Quote from: Grincheux on March 18, 2021, 08:44:37 PM ---You seem to right, but in this case one can consider a bug into any compiler that accept local and parameters variable to begin with an underscore. I have seen many C grammars, it is not forbidden to use the underscore anywhere in the variable name.

--- End quote ---
No war, never  :)
Maybe I haven't been clear enough, you can use the underscore, and the compiler will never prevent you to do so.
The standard prohibit the use of symbols beginning with underscores for application code, but you are allowed to use them when using system  or library headers or symbols.
The compiler don't, and can't, block you because you must be allowed to create a compiler header or library, and must be allowed to use those symbols in your application code.
So the compiler will not complain, but the code isn't compliant with the standard.
Said that you're free to do whatever you want... only your code isn't formally correct ;D ;D ;D ;D

Grincheux:
Frankie Game, Set and Match  :o

frankie:
 ;D ;D ;D
Ok, drawed match.

Navigation

[0] Message Index

[*] Previous page

Go to full version