Bug 211926

Summary: valgrind.h doesn't build with "gcc -pedantic"
Product: [Developer tools] valgrind Reporter: Timur Iskhodzhanov <timurrrr>
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: normal CC: flo2030
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: All   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Timur Iskhodzhanov 2009-10-26 12:25:51 UTC
Hi,

This issue was found while adding valgrind annotations to V8.

1) svn co svn://svn.valgrind.org/valgrind/trunk/include .
2) Type the following code into source.c/source.cpp:
  #include "valgrind.h"

  int main(void) {
    VALGRIND_PRINTF("Test");
    return 0;
  }

3) g++ -pedantic source.cpp 
In file included from source.cpp:1:
valgrind.h:235: error: ISO C++ does not support ‘long long’
valgrind.h: In function ‘int VALGRIND_PRINTF(const char*, ...)’:
valgrind.h:3705: error: ISO C++ does not support ‘long long’
valgrind.h:3705: error: ISO C++ does not support ‘long long’
valgrind.h:3705: error: ISO C++ does not support ‘long long’
valgrind.h:3705: error: ISO C++ does not support ‘long long’
valgrind.h:3705: error: ISO C++ does not support ‘long long’
valgrind.h:3705: error: ISO C++ does not support ‘long long’
valgrind.h:3705: error: ISO C++ does not support ‘long long’
valgrind.h:3705: error: ISO C++ does not support ‘long long’
valgrind.h: In function ‘int VALGRIND_PRINTF_BACKTRACE(const char*, ...)’:
valgrind.h:3720: error: ISO C++ does not support ‘long long’
valgrind.h:3720: error: ISO C++ does not support ‘long long’
valgrind.h:3720: error: ISO C++ does not support ‘long long’
valgrind.h:3720: error: ISO C++ does not support ‘long long’
valgrind.h:3720: error: ISO C++ does not support ‘long long’
valgrind.h:3720: error: ISO C++ does not support ‘long long’
valgrind.h:3720: error: ISO C++ does not support ‘long long’
valgrind.h:3720: error: ISO C++ does not support ‘long long’

4) gcc -pedantic source.c
In file included from source.c:1:
valgrind.h:235: warning: ISO C90 does not support ‘long long’
valgrind.h: In function ‘VALGRIND_PRINTF’:
valgrind.h:3705: warning: ISO C90 does not support ‘long long’
valgrind.h:3705: warning: ISO C90 does not support ‘long long’
valgrind.h:3705: warning: ISO C90 does not support ‘long long’
valgrind.h:3705: warning: ISO C90 does not support ‘long long’
valgrind.h:3705: warning: ISO C90 does not support ‘long long’
valgrind.h:3705: warning: ISO C90 does not support ‘long long’
valgrind.h:3705: warning: ISO C90 does not support ‘long long’
valgrind.h:3705: warning: ISO C90 does not support ‘long long’
valgrind.h: In function ‘VALGRIND_PRINTF_BACKTRACE’:
valgrind.h:3720: warning: ISO C90 does not support ‘long long’
valgrind.h:3720: warning: ISO C90 does not support ‘long long’
valgrind.h:3720: warning: ISO C90 does not support ‘long long’
valgrind.h:3720: warning: ISO C90 does not support ‘long long’
valgrind.h:3720: warning: ISO C90 does not support ‘long long’
valgrind.h:3720: warning: ISO C90 does not support ‘long long’
valgrind.h:3720: warning: ISO C90 does not support ‘long long’
valgrind.h:3720: warning: ISO C90 does not support ‘long long’
Comment 1 Florian Krohm 2014-11-19 07:42:12 UTC
Fixed in r14732.