aboutsummaryrefslogtreecommitdiffstats
path: root/solc
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-10-02 18:45:26 +0800
committerchriseth <c@ethdev.com>2015-10-02 18:45:26 +0800
commitcae8db989a28838dc25c262f60b34162e6e3f83d (patch)
tree5312fb4944f243347de5ce8473ae1908721efa4e /solc
parent0bedebe9b54e8c445476a5650cd7eacc3d060b02 (diff)
parent53d0684cb4dc7d7b5c9e92bf9e77383e14ecec8c (diff)
downloaddexon-solidity-cae8db989a28838dc25c262f60b34162e6e3f83d.tar
dexon-solidity-cae8db989a28838dc25c262f60b34162e6e3f83d.tar.gz
dexon-solidity-cae8db989a28838dc25c262f60b34162e6e3f83d.tar.bz2
dexon-solidity-cae8db989a28838dc25c262f60b34162e6e3f83d.tar.lz
dexon-solidity-cae8db989a28838dc25c262f60b34162e6e3f83d.tar.xz
dexon-solidity-cae8db989a28838dc25c262f60b34162e6e3f83d.tar.zst
dexon-solidity-cae8db989a28838dc25c262f60b34162e6e3f83d.zip
Merge pull request #101 from LianaHus/sol_Disallow_access_if_not_initialized
Disallow access to non-initialized references in storage
Diffstat (limited to 'solc')
-rw-r--r--solc/CommandLineInterface.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp
index a1f5fd66..be10faa8 100644
--- a/solc/CommandLineInterface.cpp
+++ b/solc/CommandLineInterface.cpp
@@ -491,12 +491,15 @@ bool CommandLineInterface::processInput()
// TODO: Perhaps we should not compile unless requested
bool optimize = m_args.count("optimize") > 0;
unsigned runs = m_args["optimize-runs"].as<unsigned>();
- if (!m_compiler->compile(optimize, runs))
- {
- for (auto const& error: m_compiler->errors())
- SourceReferenceFormatter::printExceptionInformation(cerr, *error, "Error", *m_compiler);
+ bool successful = m_compiler->compile(optimize, runs);
+ for (auto const& error: m_compiler->errors())
+ SourceReferenceFormatter::printExceptionInformation(
+ cerr,
+ *error,
+ (dynamic_pointer_cast<Warning const>(error)) ? "Warning" : "Error", *m_compiler
+ );
+ if (!successful)
return false;
- }
m_compiler->link(m_libraries);
}
catch (ParserError const& _exception)