expected identifier for segment name; found 'symbol'
The name of the segment in #pragma alloc_text must be a string or an identifier. The compiler ignores the pragma if a valid identifier is not found. The following sample generates C4080:
extern "C" void func(void); #pragma alloc_text() // C4080 // try this line to resolve the warning // #pragma alloc_text("mysection", func) void main() { } void func(void) { }