Export (0) Print
Expand All
Expand Minimize

Compiler Warning (level 1) C4177

#pragma pragma should be at global scope

The pragma pragma should not be used within a local scope. The pragma will not be valid until global scope is encountered after the current scope.

The following sample generates C4177:

// C4177.cpp
// compile with: /W1
// #pragma bss_seg("global")   // OK

int main() {
   #pragma bss_seg("local")    // C4177

Community Additions

© 2015 Microsoft