diff options
author | Fredrik Gustafsson <[email protected]> | 2012-08-23 10:57:50 +0200 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2012-08-23 10:57:50 +0200 |
commit | d3ba4c96e621d4e68e38926f051aadd2b0869dc9 (patch) | |
tree | d4fc0f35f41d9c9e1674af29510e797a118220fc /lib/compiler/src/v3_core.erl | |
parent | 064b42237d891d5fdcb6c1a351980b8291437618 (diff) | |
parent | e7720fe2b2a1f09af70e74b54442f72f84609a31 (diff) | |
download | otp-d3ba4c96e621d4e68e38926f051aadd2b0869dc9.tar.gz otp-d3ba4c96e621d4e68e38926f051aadd2b0869dc9.tar.bz2 otp-d3ba4c96e621d4e68e38926f051aadd2b0869dc9.zip |
Merge branch 'maint' of super:otp into maint
* 'maint' of super:otp:
Revert "Merge branch 'nox/compile-column-numbers' into maint"
compiler: Warn if the size of a binary segment is invalid
Allow non-ASCII characters in Xref filanmes
Add powerpc dso xcomp file
Diffstat (limited to 'lib/compiler/src/v3_core.erl')
-rw-r--r-- | lib/compiler/src/v3_core.erl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/compiler/src/v3_core.erl b/lib/compiler/src/v3_core.erl index 242196c593..01042cc56f 100644 --- a/lib/compiler/src/v3_core.erl +++ b/lib/compiler/src/v3_core.erl @@ -823,6 +823,13 @@ bitstr({bin_element,_,E0,Size0,[Type,{unit,Unit}|Flags]}, St0) -> {_,_} -> throw(bad_binary) end, + case Size1 of + #c_var{} -> ok; + #c_literal{val=Sz} when is_integer(Sz), Sz >= 0 -> ok; + #c_literal{val=undefined} -> ok; + #c_literal{val=all} -> ok; + _ -> throw(bad_binary) + end, {#c_bitstr{val=E1,size=Size1, unit=#c_literal{val=Unit}, type=#c_literal{val=Type}, |