__attribute__((pure))的gcc文档状态:Manyfunctionshavenoeffectsexceptthereturnvalueandtheirreturnvaluedependsonlyontheparametersand/orglobalvariables.Suchafunctioncanbesubjecttocommonsubexpressioneliminationandloopoptimizationjustasanarithmeticoperatorwouldbe.Thesefunctionsshouldbedeclaredwiththeattrib