I agree with alaric, there is no point in writing machine plc code in c, plc's have a unique structure that suits automation control, it has many features to protect from bad programming practices like going into stop if the program hangs, or faults in the hardware & turning off outputs just look at windows how many times has scada or HMi hung just when you want to stop a pump because it's wired the wrong way (manual control/testing via HMI etc.).
It's very rare for a plc to fault & leave something running (except for real hardware faults)
Lets keep the plc anyway if you use c in a plc then it would convert it into the same machine code used in ladder so don't see the point, quite frankly the use of script type language used in siemens & many others seems a waste of time, it's only use is to transport code from one platform to another, this never works properly as the instructions are different, even looking at s5 to s7 conversion only works on some code.
sorry if any mistakes in this left my glasses at work,
can't see a damm thing