On Jul 16, 2011, at 10:15 PM, Douglas Gregor wrote: > > On Jul 16, 2011, at 10:14 PM, Douglas Gregor wrote: > >> >> On Jul 16, 2011, at 11:31 AM, Fariborz Jahanian wrote: >> >>> Author: fjahanian >>> Date: Sat Jul 16 13:31:33 2011 >>> New Revision: 135348 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=135348&view=rev >>> Log: >>> Remove a gcc warning. >>> >>> >>> Modified: >>> cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp >>> >>> Modified: cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp?rev=135348&r1=135347&r2=135348&view=diff >>> ============================================================================== >>> --- cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp (original) >>> +++ cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp Sat Jul 16 13:31:33 2011 >>> @@ -723,7 +723,7 @@ >>> != Diagnostic::Ignored) { >>> if (CFG *cfg = AC.getCFG()) { >>> UninitValsDiagReporter reporter(S); >>> - UninitVariablesAnalysisStats stats = {}; >>> + UninitVariablesAnalysisStats stats; >> >> Don't we need to make sure that the members of 'stats' get zero-initialized? > > Hah, and I see that Benjamin fixed this already in r135351.
Yes, he fixed this already. But it is weird that we resort to hacks to do this. Can't the default constructor do this? I am not sure what the issue is that this cannot be done in a c++-way (Have not looked at it closely). - fariborz > > - Doug _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
