Bug 211926 - valgrind.h doesn't build with "gcc -pedantic"
Summary: valgrind.h doesn't build with "gcc -pedantic"
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries All
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-26 12:25 UTC by Timur Iskhodzhanov
Modified: 2014-11-19 07:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.