<p>Ah, I get what you mean. I think we should print a bare word error if the expanded string does not start with a digit. This makes it similar to what <code>%{expr:...}</code> and <code>%if</code> does:</p>
<pre><code>$ ./rpm --define "aaa a" --define "bbb 123b" --eval '%{expr: %aaa }'
error: bare words are no longer supported, please use "...":  a 
error:                                                        ^
$ ./rpm --define "aaa a" --define "bbb 123b" --eval '%[ %aaa ]'
error: macro expansion returned a bare word, please use "...":  %aaa 
error:                                                          ^
error: expanded string: a
$ ./rpm --define "aaa a" --define "bbb 123b" --eval '%[ %bbb ]'
error: macro expansion did not return an integer:  %bbb 
error:                                             ^
error: expanded string: 123b
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/rpm-software-management/rpm/pull/846?email_source=notifications&email_token=ADLPZUYCINT3WRMEH7UGH2TQKTMT5A5CNFSM4IX64Y7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7G3UUQ#issuecomment-533576274">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ADLPZUYDAJ4LHI3HTLWAFCDQKTMT5ANCNFSM4IX64Y7A">mute the thread</a>.<img src="https://github.com/notifications/beacon/ADLPZU2I43Q73XQTCWHQ3Y3QKTMT5A5CNFSM4IX64Y7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7G3UUQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/rpm-software-management/rpm/pull/846?email_source=notifications\u0026email_token=ADLPZUYCINT3WRMEH7UGH2TQKTMT5A5CNFSM4IX64Y7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7G3UUQ#issuecomment-533576274",
"url": "https://github.com/rpm-software-management/rpm/pull/846?email_source=notifications\u0026email_token=ADLPZUYCINT3WRMEH7UGH2TQKTMT5A5CNFSM4IX64Y7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7G3UUQ#issuecomment-533576274",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>