In C, are the following clearly defined?
void* ptr = &ptr; void* array[1] = {array};
In other words, can you use the address of a variable to initialize this variable? It seems to work with the GCC compiler, but I just want to know what I can rely on.
Edit: is it essentially a duplicate of a pointer definition for a link to a link with the same variable name?
SHOULD be legal. Since ptr is not const, its initialization value is not fixed in the .text code area and therefore must be known at runtime and written to RAM with the correct value.
Source: https://habr.com/ru/post/1257697/More articles:Windows Forms: clicks through a partially transparent window "always on top" - c #Visual Studio Emulator for Android for Android Studio - androidMaven WADL plugin not creating useful WADL - javaskip artifacts between Congress assignments without S3 or similar external resources - concourseHow to use Observable using Async channel inside Angular2 click function - angularDoes Swift have quadratic string concatenation when using var? - stringDefining a pointer to reference the same reference to a variable name? - c ++Same image, but different base64 - javaHow to prevent fractional pixels in an element with a width set to auto? - cssOrdner nicht angegeben with OmniPascal in VSCode - omnipascalAll Articles