Unverified Commit a9e16bd7 by nihui Committed by GitHub

Fix build android ndk r16b

parent 6a6e311d
...@@ -5417,7 +5417,7 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi ...@@ -5417,7 +5417,7 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
if (! IsPow2(value)) if (! IsPow2(value))
error(loc, "must be a power of 2", "buffer_reference_align", ""); error(loc, "must be a power of 2", "buffer_reference_align", "");
else else
publicType.qualifier.layoutBufferReferenceAlign = (unsigned int)std::log2(value); publicType.qualifier.layoutBufferReferenceAlign = (unsigned int)log2(value);
if (nonLiteral) if (nonLiteral)
error(loc, "needs a literal integer", "buffer_reference_align", ""); error(loc, "needs a literal integer", "buffer_reference_align", "");
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment