Noggin-
I don't think it any more butcherous than a lot of things people do to C code for microcontrollers. Things like using gotos, global variables, fixing variables in specific RAM locations, inline assembler, etc etc.
I don't think I even know
how to use a goto
My college instructor showed us one and then refused to teach us how to use it. Strictly speaking that isn't the best teaching practice, but I don't mind.
I am guilty of using globals, but only when there is a good benefit to them being global. For instance, if I have a few temperature sensors on a board, I typically have a temperature.c/h file and an adc.c/h file. I'll have the temperature variables defined globally in the temperature.h file so that the adc functions can read the ADC pin, calculate the temperature, and store it in the global variable. Inside the adc.c files, i'll have low pass filters defined as a local global so that I don't have to pass it between the adc service routine and the temperature calculation routines.
I also commonly have data structures that contain all of my current information for my project such as status_data, parameter_data, history_data, etc. Status_data would have my current temperature settings, what my inputs and outputs are doing, where control knobs are set, etc. In my Service_Inputs() function, I can set status_data.digital_inputs to what the debounced value currently is. This way, when I get around to Service_Comms(), if I have a tell-me-your-status-data command, all I have to do is set up a packet header and memcpy status_data to a buffer following the packet header. This saves me from having to call a dozen Get_Some_Data functions. I'm not arguing that this is the best way to do it, I'm just saying what works for me (like we're all doing right now) and keeps my code clean.
Now, in my second post in this thread I mentioned that I inherited a 50,000 line program all in one c file. The first several hundred lines was every variable definition... including i, j, and k. I
hate that project.
As for fixing variables in specific RAM locations, I'm guilty of that if the project has a bootloader. I'll make a persistent watchdog_counter in a specific location in my bootloader and application so they can both keep track of whether or not there is a potentially major issue. It would probably be better to modify the linker script and make a section that is persistent and keep them both in that section.
But like you said, sometimes your MCU is just too small to do what you want to do so you do what you have to do. I have the luxury of working on fairly large code size projects so I get to play in the 512k PIC32 world more often than I play in the 2k PIC12 world