Loading ...
Sorry, an error occurred while loading the content.

a couple of helpful tips for VC++ (pragmas for warnings)

Expand Messages
  • jsrs701@yahoo.com
    Hi everybody, More with the Stupid Human Visual C++ tricks (with apologies to Letterman). You will probably at some point run into the problem wherein the
    Message 1 of 1 , Aug 2, 2001
    • 0 Attachment
      Hi everybody,

      More with the Stupid Human Visual C++ tricks (with apologies to
      Letterman).

      You will probably at some point run into the problem wherein the
      debug symbols generated are over 256 characters long. (Ain't
      templates grand?)

      As well, you'll get warnings that certain variables ("pe", an
      exception object reference used by default error handling) are unused.

      In my quest to get error- and warning-free compiles, I put a
      couple of pragmas at the top of my ANTLR files to ditch these
      warnings, as such:

      header "pre_include_hpp" {
      // Ditch the warnings about the long template type names,
      // as well as the unreferenced variable warning
      #pragma warning( disable: 4786; disable: 4101 )
      }

      I don't usually do this--warnings are there for a reason. But this
      helps clean up the output a bit!

      JSRS
    Your message has been successfully submitted and would be delivered to recipients shortly.