[llvm] r216344 - Silence gcc -Wpedantic.
Patrik Hägglund H
patrik.h.hagglund at ericsson.com
Fri Sep 12 11:01:18 PDT 2014
> What was the particular warning here?
../tools/llvm-cov/llvm-cov.cpp:53:49: error: ISO C++ forbids zero-size array 'argv' [-Werror=pedantic]
std::string Invocation(std::string(argv[0]) + " " + argv[1]);
From: David Blaikie [mailto:dblaikie at gmail.com]
Sent: den 24 augusti 2014 23:15
To: Patrik Hägglund H
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm] r216344 - Silence gcc -Wpedantic.
On Aug 24, 2014 1:05 PM, "Patrik Hagglund" <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>> wrote:
>
> Author: patha
> Date: Sun Aug 24 04:12:33 2014
> New Revision: 216344
>
> URL: http://llvm.org/viewvc/llvm-project?rev=216344&view=rev
> Log:
> Silence gcc -Wpedantic.
What was the particular warning here?
>
> Modified:
> llvm/trunk/tools/llvm-cov/llvm-cov.cpp
>
> Modified: llvm/trunk/tools/llvm-cov/llvm-cov.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/llvm-cov.cpp?rev=216344&r1=216343&r2=216344&view=diff
> ==============================================================================
> --- llvm/trunk/tools/llvm-cov/llvm-cov.cpp (original)
> +++ llvm/trunk/tools/llvm-cov/llvm-cov.cpp Sun Aug 24 04:12:33 2014
> @@ -50,7 +50,7 @@ int main(int argc, const char **argv) {
> func = gcov_main;
>
> if (func) {
> - std::string Invocation(std::string(argv[0]) + " " + argv[1]);
> + std::string Invocation(std::string() + argv[0] + " " + argv[1]);
> argv[1] = Invocation.c_str();
> return func(argc - 1, argv + 1);
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140912/f4223320/attachment.html>
More information about the llvm-commits
mailing list