SHARE
TWEET

ARM suppress compiler warnings

a guest Oct 13th, 2016 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "mbed.h"
  2.  
  3. // Tutorial at https://ee-programming-notepad.blogspot.com/2016/10/suppress-any-warning-in-mbed-compiler.html
  4. // Readme: https://developer.arm.com/docs/dui0472/latest/compiler-specific-features/pragma-diag_suppress-tagtag
  5. // Warning and error codes: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0496b/BABDJCCI.html
  6.  
  7. // Suppress "Warning: Integer conversion resulted in truncation in "main.cpp", Line: 6, Col: 16"
  8. // 69 - Integer conversion resulted in truncation
  9. #pragma diag_suppress 69
  10.  
  11. uint16_t address;
  12.  
  13. int main() {
  14.     address = 0x10000; // unattainable address
  15. }
RAW Paste Data
Want to get better at C++?
Learn to code C++ in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top