Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: src/utils.h

Issue 3274008: Get gcc to check that we don't ignore return values of functions that can... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/stub-cache.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 Dest dest; 944 Dest dest;
945 memcpy(&dest, &source, sizeof(dest)); 945 memcpy(&dest, &source, sizeof(dest));
946 return dest; 946 return dest;
947 } 947 }
948 948
949 template <class Dest, class Source> 949 template <class Dest, class Source>
950 inline Dest BitCast(Source* source) { 950 inline Dest BitCast(Source* source) {
951 return BitCast<Dest>(reinterpret_cast<uintptr_t>(source)); 951 return BitCast<Dest>(reinterpret_cast<uintptr_t>(source));
952 } 952 }
953 953
954
955 #ifdef __GNUC__
Vyacheslav Egorov (Chromium) 2010/08/30 16:31:25 1) GCC reference manual mentions this attribute st
956 #define NOIGNORE __attribute__ ((warn_unused_result))
957 #else
958 #define NOIGNORE
959 #endif
960
954 } } // namespace v8::internal 961 } } // namespace v8::internal
955 962
956 #endif // V8_UTILS_H_ 963 #endif // V8_UTILS_H_
OLDNEW
« no previous file with comments | « src/stub-cache.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698