mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Compiler crash when compiling c code in a library without --obj-out #1503.
This commit is contained in:
12
lib/std/crypto/dh.c3
Normal file
12
lib/std/crypto/dh.c3
Normal file
@@ -0,0 +1,12 @@
|
||||
module std::crypto::dh;
|
||||
import std::math::bigint;
|
||||
|
||||
fn BigInt generate_secret(BigInt p, BigInt x, BigInt y)
|
||||
{
|
||||
return y.mod_pow(x, p);
|
||||
}
|
||||
|
||||
fn BigInt public_key(BigInt p, BigInt g, BigInt x)
|
||||
{
|
||||
return g.mod_pow(x, p);
|
||||
}
|
||||
@@ -71,6 +71,7 @@
|
||||
- Detect recursion errors on non-recursive mutexes in safe mode.
|
||||
- Foreach over distinct pointer failed to be caught as error #1506.
|
||||
- Foreach over distinct iterable would ignore operator(len).
|
||||
- Compiler crash when compiling c code in a library without --obj-out #1503.
|
||||
|
||||
### Stdlib changes
|
||||
- Additional init functions for hashmap.
|
||||
|
||||
@@ -872,8 +872,8 @@ const char *cc_compiler(const char *cc, const char *file, const char *flags, con
|
||||
{
|
||||
const char *dir = compiler.build.object_file_dir;
|
||||
if (!dir) dir = compiler.build.build_dir;
|
||||
if (output_subdir) dir = file_append_path(dir, output_subdir);
|
||||
dir_make(dir);
|
||||
if (output_subdir) dir = dir ? file_append_path(dir, output_subdir) : output_subdir;
|
||||
if (dir) dir_make(dir);
|
||||
bool is_cl_exe = str_eq(cc, "cl.exe");
|
||||
char *filename = NULL;
|
||||
bool split_worked = file_namesplit(file, &filename, NULL);
|
||||
|
||||
Reference in New Issue
Block a user