Commit Graph

156 Commits

Author SHA1 Message Date
Pierre Muller
63642b13c8 Add -vj option in options unit to set V_Parallel
Add mainsourcefile to all messages when V_Parallel verbosity option is set
Flatten out -vX options in help message to make changes easier
Add -vj option in help message
2023-09-09 07:49:22 +00:00
Pierre Muller
63f91a768c Avoid double definition of V_XXX constants by moving them to globals unit
Add new V_Parallel constant
2023-09-09 06:54:30 +00:00
Pierre Muller
3770b55ce1 Disable substitution by environment variables in message comment related functions 2023-06-07 01:02:28 +02:00
florian
a807144ead * patch by Rika: Fix and possible simplification of SanitiseXMLString, part of #39800 2023-04-04 23:21:14 +02:00
Sven/Sarah Barth
598da1936e * change ChangeMessageVerbosity from String to AnsiString as long parameters might be passed to it 2022-06-14 14:33:21 +02:00
Sven/Sarah Barth
0d8156fee9 * use a TCmdStr as parameter for SetVerbosity as it gets passed a TCmdStr in the option handling, thus may contain a parameter value (especially -vmXXX) larger than 255 characters 2022-06-14 14:10:53 +02:00
Sven/Sarah Barth
3ca3c7a606 - remove duplicate paraprintnodetree to ensure that there the right paraprintnodetree is used (namely the one from globals) 2022-05-26 21:42:51 +02:00
florian
89f9ebc7b7 * throw an error if raise is called in a noreturn subroutine outside of any exception frame, resolves #39514 2022-01-06 21:13:19 +01:00
J. Gareth "Curious Kit" Moreton
0f1c4b4db8 Fixed Unreachable code warning when building on a 32-bit platform with DEBUG_NODE_XML 2021-12-02 20:32:05 +00:00
florian
321764bdd9 * fix warnings with -dDEBUG_NODE_XML, resolves #38222 2021-10-13 23:08:32 +02:00
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