Commit Graph

146 Commits

Author SHA1 Message Date
florian
0188a558d1 - obsolete defines removed
git-svn-id: trunk@49184 -
2021-04-11 18:18:30 +00:00
florian
225eb8ed12 * do not output error numbers for options
git-svn-id: trunk@48397 -
2021-01-24 14:34:02 +00:00
pierre
9a0107a19d Fix compilation failure for avr compiler with -dDEBUG_NODE_XML, to fix bug report 38222
git-svn-id: trunk@47783 -
2020-12-16 00:07:39 +00:00
pierre
6230de31bb * Second patch xml-node-dump-defs.patch from J. Gareth Moreton from bug report 36882.
With same changes to ensure that xmllint find no errors in generated xml files.

git-svn-id: trunk@47667 -
2020-12-02 21:01:40 +00:00
pierre
af17e9460b Apply patch proposed by J. Gareth Moreton in:
bug report #0036882: [Feature] Class and record definition XML dump extension

  These patches extend the node dump feature (enabled with DEBUG_NODE_XML)
  so it also dumps class and record definitions to the XML file. They are contained within <definition> tags.
  Currently only fields and constants are dumped to the XML file. Methods, constant and variable definitions may be added later.

git-svn-id: trunk@47658 -
2020-12-01 11:45:14 +00:00
nickysn
a34f531661 + implemented support for codepage aware compiler messages. It can be enabled
per platform (currently only enabled for win32 and win64). Enabling it forces
  code page conversion from the codepage of the .msg file to CP_ACP, before
  writing the message to the console. Not enabling it keeps the previous
  behaviour of not doing any kind of code page conversion for messages. This
  feature should be tested and enabled per platform, because it requires code
  page conversion support in the rtl (so it may require adding the appropriate
  extra units, such as fpwidestring). When this feature is enabled for all
  platforms, we can start keeping only one .msg file per language, because
  having extra .msg files for different encodings for the same language becomes
  redundant, since the compiler can do code page conversion to whatever code
  page the console uses.

git-svn-id: trunk@36450 -
2017-06-08 16:11:33 +00:00
Károly Balogh
72e1443081 + don't abuse status.currentsourcepath to pass on PPU names if the source is unavailable, causes side effects with other frontends (like the IDE). Improved solution for Mantis #27588
git-svn-id: trunk@30373 -
2015-03-29 19:05:19 +00:00
florian
f6f8e1b83e * write ppu+source file name in case the source file is not available instead of inserting an invalid absolute path, resolves #27588
git-svn-id: trunk@30242 -
2015-03-15 19:51:17 +00:00
florian
a0f0d0de40 * make use of the noreturn directive for internalerror
* clean up of the internalerror procedure variable in the constexp unit

git-svn-id: trunk@26004 -
2013-11-10 09:01:03 +00:00
pierre
6d8b1e03d7 Increase status.errorcount only inside GenerateError procedure, to simplify debugging
git-svn-id: trunk@23398 -
2013-01-16 09:45:57 +00:00
pierre
2d0f01e0dd Enable writing of Warnings/Notes/hints if they are considered as errors using -SeX option
to avoid getting a compiler failure without any error printed out

git-svn-id: trunk@22378 -
2012-09-13 07:34:23 +00:00
florian
3f14f2b61b + be able to turn off warning -> error conversion on the command line (with -)
git-svn-id: trunk@21754 -
2012-07-01 18:47:45 +00:00
pierre
2b4e2dc164 * Fix ChangeMessageVerbosity by adingd a recordpendingmessagestate call
git-svn-id: trunk@19573 -
2011-11-02 22:08:14 +00:00
paul
aba10cd184 compiler:
- allow turning some messages off by default by prefixing verbosity type with '-' sign (in error.msg)
  - interpret -vm- as a switch which changes message verbosity to *on* by default
  * appropriate error.msg file changes will come later

git-svn-id: trunk@19570 -
2011-11-02 09:20:59 +00:00
florian
d7f7a9bb76 * patch by Alexander Shishkin to clean up $ifopt usage by $push/$pop, resolves #20346
git-svn-id: trunk@19256 -
2011-09-27 20:22:40 +00:00
florian
8c2eb2fa36 + added forgotten unaligned call
git-svn-id: trunk@18998 -
2011-09-06 21:02:59 +00:00
florian
431da61f3a * cleaned up FreeLocalVerbosity usage
git-svn-id: trunk@18997 -
2011-09-06 21:02:20 +00:00
pierre
713f269ce2 * Change Field passing type of FreeLocalVerbosity parameter
to by value to avoid passing an unaligned pointer.
  * Adapt code calling FreeLocalVerbosity  to reset
    currrent_settings.pmessage to nil afterwards.

git-svn-id: trunk@18978 -
2011-09-05 12:52:37 +00:00
pierre
d09389ac79 Implement support for $WARN XXX ON/OFF/ERROR
* globtype.pas:
  tmsgstate updated (ms_on/off/error_global variants added).
  ms_local_mask, ms_global_mask : new constants.
  tmessagestaterecord: new record, use to list chains
  of local changes to warnings by $WARN directive.
  pmessagestaterecord: new pointer to tmessagestaterecord.

  * globals.pas:
    tsettings record:
    new field: pmessage of type pmessagestaterecord;

  * cmsgs.pas:
  TMessage class:
  New method: ResetStates; Called on unit parsing changes
  New Method: SetVerbosity(nr:longint;newstate:tmsgstate):boolean;
  Remember global state in
  replacing ClearVerbosity method.
  New boolean field:  has_local_changes
  set if a call to SetVerbosity makes a local change that must be
  reset when changing unit.

  * verbose.pas:
  New functions/procedures:
  function  SetMessageVerbosity(v:longint;state:tmsgstate):boolean;
  for changes caused by $WARN or option
  procedure RestoreLocalVerbosity(pstate : pmessagestaterecord);
  procedure FreeLocalVerbosity(var fstate : pmessagestaterecord);
  function ChangeMessageVerbosity(s: string; var i: integer;state:tmsgstate): boolean;

  * switches.pas:
  Implement recordpendingmessagestate
  flushpendingswitchesstate: Handle new pmessage field of
  current_settings record.

  * parser.pas:
  Handle pmessage field of current_settings.

  * scandir.pas:

  Handle also integer constants in $WARN.

git-svn-id: trunk@17852 -
2011-06-28 10:03:07 +00:00
florian
13285ab264 o several strings changed into ansistrings, resolves #19318, no compilation speed degrations measurable
* TCmdStr changed into an ansistring
 * command line parameter handling uses now ansistrings
 * message handling parameters are now ansistrings

git-svn-id: trunk@17469 -
2011-05-15 14:53:31 +00:00
Jonas Maebe
43846ca8c9 * force always printing absolute paths when using -vb (mantis #15783)
git-svn-id: trunk@15000 -
2010-03-10 10:04:51 +00:00
paul
a8381c8b32 fpc: compiler:
- complete $WARN switch parsing and add a stab to change message state
  - reimplement way of message hiding by -vm switch (by Dmitry Boyarintsev)
(note: $WARN switch does not work at the moment since state handling is not yet implemented)

git-svn-id: trunk@14809 -
2010-01-27 06:59:58 +00:00
Jonas Maebe
e5920bc2b8 * delay verbosity changes just like localswitches changes
* store a node's verbosity in the node so that e.g. disabling warnings
    also disables warnings for this node in pass_1
   (the above together fix mantis #12076)
  * save/restore verbosity with {$push}/{$pop} (mantis #12075)
  * if warnings/notes/hints are turned off, also do not count encountered
    ones for the totals (otherwise -Sew cannot be used properly in
    combination with {$warnings off}, because disabled warnings will still
    trigger a compiler error) -- this required adding -vw/-vn/-vh to all
    tests using -Sew/-Sen/-Seh
  - removed some superfluous state saving/restoring from firstpass()

git-svn-id: trunk@12025 -
2008-11-03 21:18:27 +00:00
Jonas Maebe
64ddae4eff + -vq parameter to show message numbers
+ -vm<x>,<y> parameter to mask messages <x> and <y>
   (both based on a patch submitted by Petr Kristan)
  * alphabetically ordered -v<x> option processing code so it's easier
    to see which characters are still free (not many anymore)
  + some tests for the -vm functionality

git-svn-id: trunk@11888 -
2008-10-12 12:19:41 +00:00
yury
5e11e697b4 * Use unsigned integers for sizes and positions to break 2GB limit in tdynamicarray, object writer, internal linker, coff and PE headers.
git-svn-id: trunk@11480 -
2008-07-28 20:29:25 +00:00
florian
86a352ad1f * patch by Sergej Gorelkin to improve speed of UpdateStatus on large projects
git-svn-id: trunk@11151 -
2008-06-01 10:37:16 +00:00
Jonas Maebe
e9108ed51c * fixed skipping of character after number of errors to report in
parsing of -Se<xxx> string (mantis #10849)

git-svn-id: trunk@10362 -
2008-02-19 20:20:26 +00:00
peter
241c65d5ec * optimize fixpath, findfile to not require temp ansistrings
* check for verbosity for V_Tried level messages, patches from Sergei Gorelkin

git-svn-id: trunk@9297 -
2007-11-19 22:24:52 +00:00
daniel
9adb202a92 * Rework the constexprint to allow operations from low(int64) to high(qword).
+ Some initial work on a formaldef which also carries the typinfo of a parameter.

git-svn-id: trunk@7639 -
2007-06-13 07:41:18 +00:00
peter
ecbcdcdabb * added status.currentmodulestate
git-svn-id: trunk@7435 -
2007-05-24 06:21:31 +00:00
peter
e2db0a3982 * cleanup current module status
* new set_current_module function that sets the current_module and
    all related variables. Also closes scanner files if required, but
    that might still need some optimization to prevent closing/opening
    files too often

git-svn-id: trunk@7428 -
2007-05-23 13:33:53 +00:00
Tomas Hajny
c2cec3a8c0 * align Comment behaviour with Msg2Comment
git-svn-id: trunk@6991 -
2007-03-25 00:21:12 +00:00
peter
89ad4a083c * fixed setting of compiling_current
git-svn-id: trunk@6630 -
2007-02-24 15:55:58 +00:00
florian
199ab92eb8 * fixed module index updating, resolves #7883
git-svn-id: trunk@6623 -
2007-02-23 23:15:58 +00:00
tom_at_work
106fe68ce6 * renamed TStringList to TCmdStrList, in general use TCmdStr instead of shortstrings to fix bug #6351
git-svn-id: trunk@6215 -
2007-01-26 22:29:39 +00:00
florian
dac9896a6d + added -vs for time stamping
git-svn-id: trunk@6176 -
2007-01-24 20:32:06 +00:00
florian
d80bfc692d * don't open error file twice but close it first if necessary
git-svn-id: trunk@5340 -
2006-11-12 16:00:01 +00:00
florian
ef7bd58c54 * germanism removed (aktfilepos -> current_filepos)
git-svn-id: trunk@5099 -
2006-10-30 22:37:31 +00:00
florian
2974bbaf10 * get proper moduleindex when loading a unit, fixes #4778
git-svn-id: trunk@5097 -
2006-10-30 21:01:51 +00:00
micha
97722babad generate more verbose messages in case of PPU/unit not found
git-svn-id: trunk@4817 -
2006-10-07 09:23:38 +00:00
olle
05d6f0e94d macos: added a fake sysutils for use by compiler, and fixed some tests
git-svn-id: trunk@4549 -
2006-09-03 22:30:37 +00:00
Tomas Hajny
a62c1faa2d + output is flushed before launching external utilities
git-svn-id: trunk@3539 -
2006-05-15 00:28:55 +00:00
florian
f378d688d4 * fixed reading of registers in intel assembler mode on x86-64
git-svn-id: trunk@3488 -
2006-05-13 09:24:42 +00:00
Tomas Hajny
c17b57db07 + Statistics of warnings, hints and notes - (modified/fixed) patch from Naj Kejah, part of wishlist item 4897, plus hardcoded text moved to message file
git-svn-id: trunk@3181 -
2006-04-09 11:54:09 +00:00
florian
1c9da313d9 * 64 bit movnti
git-svn-id: trunk@3091 -
2006-03-30 18:12:33 +00:00
peter
785550d7e3 Merged revisions 2669,2673,2677,2683,2696,2699-2702,2704,2708,2712-2715,2718,2722-2723,2728-2730,2740,2769 via svnmerge from
svn+ssh://peter@www.freepascal.org/FPC/svn/fpc/branches/linker/compiler

........
r2669 | peter | 2006-02-23 09:31:21 +0100 (Thu, 23 Feb 2006) | 2 lines

  * add compiler dir

........
r2673 | peter | 2006-02-23 17:08:56 +0100 (Thu, 23 Feb 2006) | 2 lines

  * enabled more code

........
r2677 | peter | 2006-02-24 17:46:29 +0100 (Fri, 24 Feb 2006) | 2 lines

  * pe stub and headers

........
r2683 | peter | 2006-02-25 23:13:24 +0100 (Sat, 25 Feb 2006) | 2 lines

  * section options cleanup

........
r2696 | peter | 2006-02-26 20:27:41 +0100 (Sun, 26 Feb 2006) | 2 lines

  * fixed typecasts

........
r2699 | peter | 2006-02-26 23:04:32 +0100 (Sun, 26 Feb 2006) | 2 lines

  * simple linking works

........
r2700 | peter | 2006-02-27 09:44:50 +0100 (Mon, 27 Feb 2006) | 2 lines

  * internal linker script

........
r2701 | peter | 2006-02-27 12:05:12 +0100 (Mon, 27 Feb 2006) | 2 lines

  * make elf working again

........
r2702 | peter | 2006-02-27 14:04:43 +0100 (Mon, 27 Feb 2006) | 3 lines

  * disable dwarf for smartlinking with .a
  * fix section start in new .a file

........
r2704 | peter | 2006-02-27 18:30:43 +0100 (Mon, 27 Feb 2006) | 2 lines

  * stab section fixes

........
r2708 | peter | 2006-02-28 19:29:17 +0100 (Tue, 28 Feb 2006) | 2 lines

  * basic work to merge stabs sections

........
r2712 | peter | 2006-02-28 23:17:48 +0100 (Tue, 28 Feb 2006) | 2 lines

  * unload tmodules before linking

........
r2713 | peter | 2006-02-28 23:18:51 +0100 (Tue, 28 Feb 2006) | 2 lines

  * fixed stabs linking

........
r2714 | peter | 2006-02-28 23:19:19 +0100 (Tue, 28 Feb 2006) | 2 lines

  * show code and data size

........
r2715 | peter | 2006-02-28 23:25:35 +0100 (Tue, 28 Feb 2006) | 2 lines

  * unload .stabs from objdata after it is merged

........
r2718 | peter | 2006-03-01 12:24:38 +0100 (Wed, 01 Mar 2006) | 3 lines

  * memsize/datasize cleanup
  * check for exports/resources when adding module to linker

........
r2722 | peter | 2006-03-03 09:12:20 +0100 (Fri, 03 Mar 2006) | 2 lines

  * new TObjSymbol splitted from TAsmSymbol

........
r2723 | peter | 2006-03-03 14:08:55 +0100 (Fri, 03 Mar 2006) | 2 lines

  * coff fixes after recent objsymbol changes

........
r2728 | peter | 2006-03-03 22:43:04 +0100 (Fri, 03 Mar 2006) | 2 lines

  * fixed coff writer

........
r2729 | peter | 2006-03-04 01:10:32 +0100 (Sat, 04 Mar 2006) | 2 lines

  * fix read-only opening

........
r2730 | peter | 2006-03-04 01:11:16 +0100 (Sat, 04 Mar 2006) | 2 lines

  * Read edata from DLLs, basic work

........
r2740 | peter | 2006-03-04 21:13:43 +0100 (Sat, 04 Mar 2006) | 3 lines

  * deletedef added
  * don't remove defs from index when we are already clearing everything

........
r2769 | peter | 2006-03-05 21:42:33 +0100 (Sun, 05 Mar 2006) | 4 lines

  * moved TObj classes to ogbase
  * ObjSection.SymbolRefs and SymbolDefines list
  * DLL importing

........

git-svn-id: trunk@2771 -
2006-03-05 21:10:37 +00:00
florian
1908ba2206 + -vb: writes compiler messages with full path instead of the file name only
git-svn-id: trunk@1114 -
2005-09-18 18:09:19 +00:00
daniel
d57c048696 * Remove ifdef 1_0
* Add expirimental 32-bit x86_64 target to systems

git-svn-id: trunk@729 -
2005-07-23 08:37:26 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00