Author
anonymous
over 6 years ago
Language
C++
Compiler
gcc 8.2.0
Options
Warnings
Boost 1.68.0
C++11
no pedantic
Author
anonymous
over 6 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-8.2.0/include -std=c++11
prog.cc:14:59: error: cast from 'volatile uint32_t*' {aka 'volatile unsigned int*'} to 'uint32_t' {aka 'unsigned int'} loses precision [-fpermissive]
kCLOCK_RootM4 = (uint32_t)(&(CCM)->ROOT[1].TARGET_ROOT)
^
prog.cc:14:48: error: expression '((CCM_Type*)808976384)->CCM_Type::ROOT[1].CCM_Type::<unnamed struct>::TARGET_ROOT' has side-effects
kCLOCK_RootM4 = (uint32_t)(&(CCM)->ROOT[1].TARGET_ROOT)
~~~~~~~~~~~~~~~^~~~~~~~~~~
prog.cc:10:14: error: 'reinterpret_cast<CCM_Type*>(808976384)' is not a constant expression
#define CCM ((CCM_Type *)CCM_BASE)
^
prog.cc:14:34: note: in expansion of macro 'CCM'
kCLOCK_RootM4 = (uint32_t)(&(CCM)->ROOT[1].TARGET_ROOT)
^~~
prog.cc:14:59: error: conversion from pointer type 'volatile uint32_t*' {aka 'volatile unsigned int*'} to arithmetic type 'uint32_t' {aka 'unsigned int'} in a constant expression
kCLOCK_RootM4 = (uint32_t)(&(CCM)->ROOT[1].TARGET_ROOT)
^
prog.cc:14:59: error: enumerator value for 'kCLOCK_RootM4' is not an integer constant
Exit Code:
1