LangOptions::MSCVersion not initialized

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

LangOptions::MSCVersion not initialized

Csaba Raduly
When compiling r122194 with GCC 4.3.4 on Cygwin 1.7, I get the
following warning:

/home/Gamer/LLVM/llvm/tools/clang/lib/AST/../../include/clang/Basic/LangOptions.h:
In function ‘const clang::DiagnosticBuilder& clang::operator<<(const
clang::DiagnosticBuilder&, const clang::TemplateArgument&)’:
/home/Gamer/LLVM/llvm/tools/clang/lib/AST/../../include/clang/Basic/LangOptions.h:24:
warning: ‘LangOpts.clang::LangOptions::MSCVersion’ may be used
uninitialized in this function
/home/Gamer/LLVM/llvm/tools/clang/lib/AST/TemplateBase.cpp:230: note:
‘LangOpts.clang::LangOptions::MSCVersion’ was declared here

As far as I can see, MSCVersion is not set in the constructor.

Csaba
--
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: LangOptions::MSCVersion not initialized

Douglas Gregor

On Dec 19, 2010, at 1:30 PM, Csaba Raduly wrote:

> When compiling r122194 with GCC 4.3.4 on Cygwin 1.7, I get the
> following warning:
>
> /home/Gamer/LLVM/llvm/tools/clang/lib/AST/../../include/clang/Basic/LangOptions.h:
> In function ‘const clang::DiagnosticBuilder& clang::operator<<(const
> clang::DiagnosticBuilder&, const clang::TemplateArgument&)’:
> /home/Gamer/LLVM/llvm/tools/clang/lib/AST/../../include/clang/Basic/LangOptions.h:24:
> warning: ‘LangOpts.clang::LangOptions::MSCVersion’ may be used
> uninitialized in this function
> /home/Gamer/LLVM/llvm/tools/clang/lib/AST/TemplateBase.cpp:230: note:
> ‘LangOpts.clang::LangOptions::MSCVersion’ was declared here
>
> As far as I can see, MSCVersion is not set in the constructor.

Thanks! Fixed in r122318.

        - Doug
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev