In C, when I want to put number 5 at address 0x28, I can do it this way:
char* x = (char *) 0x28;
*x = 5;
If I want, I can do the same without declaring a variable:
*((char *) 0x28) = 5;
If I want that compiler treats this address as volatile, I can do it this way:
volatile char* x = (char *) 0x28;
*x = 5;
Can I do it without declaring a variable?
Edit: Let me explain why I want to do "*((char *) 0x28) = 5". I write a blinking LED hello world program for ATmega32U4 and I know that address 0x28 rules the pin to which my LED is connected. And it does work: the C code which you suggested compiles to correct machine code and the LED blinks.
(char *) 0x28is undefined behavior (UB), unless 0x28 was the address of an object.*((char *) 0x28) = 5;, then it is also likely the user (or others checking this post) do not realize code "doing something so clearly invalid" applies. There is no hammer involved, simply a statement that code may be UB.