[Webkit-unassigned] [Bug 98665] Remove <wtf/Platform.h> include from header files.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Nov 5 11:41:21 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=98665
Joseph Pecoraro <joepeck at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |joepeck at webkit.org
--- Comment #12 from Joseph Pecoraro <joepeck at webkit.org> 2012-11-05 11:42:50 PST ---
(In reply to comment #10)
> This change needed more discussion before the change was made. Not sure what to do about it now.
I agree with Darin here. Assertions.h makes heavy use of WTF / Platform macros. If I just make a test file to include <wtf/Assertions.h> on its own this causes more then 20 errors (clang stops printing errors)
#include <wtf/Assertions.h>
int main(int argc, char *argv[])
{
ASSERT(true);
return 0;
}
Errors look like:
#if !COMPILER(MSVC)
~~~~~~~~~^
/Volumes/Data/Build/Debug/usr/local/include/wtf/Assertions.h:58:13: error: token is not a valid binary operator in a preprocessor subexpression
#if HAVE(VARIADIC_MACRO)
~~~~^
/Volumes/Data/Build/Debug/usr/local/include/wtf/Assertions.h:85:9: error: token is not a valid binary operator in a preprocessor subexpression
/Volumes/Data/Build/Debug/usr/local/include/wtf/Assertions.h:137:1: error: unknown type name 'WTF_EXPORT_PRIVATE'
WTF_EXPORT_PRIVATE void WTFReportAssertionFailure(const char* file, int line, const char* function, const char* assertion);
^
/Volumes/Data/Build/Debug/usr/local/include/wtf/Assertions.h:137:20: error: expected unqualified-id
In order for this to compile at all I would need to Platform.h and ExportMacros.h. And then be sure to include them before Assertions.h (error prone):
#include <wtf/Platform.h>
#include <wtf/ExportMacros.h>
#include <wtf/Assertions.h>
Removing Platform.h from WebCore headers makes sense. But, I think removing Platform.h from Assertions.h may have been a bad idea. Was there further work planned here?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list