In file included from main.cpp:16:0:
date.h: In static member function 'static Date::date Date::date_by_number(int)':
date.h:43:53: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
bool is_leap = year % 400 == 0 || year % 4 == 0 && year % 100 != 0;
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
date.h: In member function 'bool Date::IsLeap()':
date.h:78:42: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
if (year % 400 == 0 || year % 4 == 0 && year % 100 != 0) {
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
|