Fix duplicate symbol of cpp2::args() function#268
Closed
filipsajdak wants to merge 1 commit intohsutter:mainfrom
Closed
Fix duplicate symbol of cpp2::args() function#268filipsajdak wants to merge 1 commit intohsutter:mainfrom
filipsajdak wants to merge 1 commit intohsutter:mainfrom
Conversation
When linking multiple cpp2 files cpp2::args symbol appears multiple times.
gregmarr
approved these changes
Mar 8, 2023
Closed
zaucy
pushed a commit
to zaucy/cppfront
that referenced
this pull request
Dec 5, 2023
This is an omnibus commit of the last few evenings' changes. Primarily it was to start laying the groundwork for constructors, but it includes other fixes and closes a few issues. Details: - Begin infrastructure preparation for constructors - Started creating navigation APIs to replace the low-level graph node chasing; this makes cppfront's own code cleaner and the tree easier to change if needed, but it's also a step toward a reflection API - Extended `main:(args)` to require the name "args" for the single-parameter `main`, and to support `args.argc` and `args.argv`, further on hsutter#262 (see comment thread) - Changed default return type for unnamed functions to be `-> void`, same as named functions, closes hsutter#257 - Disallow single-expression function body to be just `return`, closes hsutter#267 - Make `make_args` inline, closes hsutter#268 - Bug fix: emit prolog also for single-expression function body. Specifically, this enables main:(args)=expression; to work correctly. Generally, this also corrects the code gen for examples that were trying (but failing) to inject prologs in single-expression functions... in the regression tests this corrected the code gen for `pure2-forward-return.cpp2` which was missing the contract check before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When linking multiple cpp2 files
cpp2::args(int, char**)symbol appears multiple times causing the followint error message:This change makes
cpp2::args(int, char**)an inline function.