]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
compiler: Mark erroneous constants as invalid.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
a79683d5
TS
12015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2
3 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4
191a6b94
MP
52015-08-12 Marek Polacek <polacek@redhat.com>
6
7 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
8 LOC to it.
9
420a9d9b
MP
102015-08-03 Marek Polacek <polacek@redhat.com>
11
12 PR c/67088
13 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
14 Use it.
15 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
16
992118a1
PP
172015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
18
19 * c-parser.c (c_parser_if_body): Take token_indent_info
20 argument. Call warn_for_misleading_indentation even when the
21 body is a semicolon. Extract token_indent_infos corresponding
22 to the guard, body and next tokens. Adjust call to
23 warn_for_misleading_indentation accordingly.
24 (c_parser_else_body): Likewise.
25 (c_parser_if_statement): Likewise.
26 (c_parser_while_statement): Likewise.
27 (c_parser_for_statement): Likewise.
28
46308474
LFSM
292015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
30 Manuel López-Ibáñez <manu@gcc.gnu.org>
31
32 * c-decl.c (get_parm_info): Remove static var. Update warning
33 message.
34
05b28fd6
MP
352015-07-27 Marek Polacek <polacek@redhat.com>
36
37 PR c++/66555
38 PR c/54979
39 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
40
451b5e48
MP
412015-07-20 Marek Polacek <polacek@redhat.com>
42
43 PR c++/55095
44 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
45 (build_binary_op): Warn about left shift overflows.
46
1916bcb5
AM
472015-07-09 Andrew MacLeod <amacleod@redhat.com>
48
49 * c-array-notation.c: Adjust includes for flags.h changes.
50 * c-objc-common.c: Likewise.
51
c7131fb2
AM
522015-07-07 Andrew MacLeod <amacleod@redhat.com>
53
54 * c-array-notation.c: Adjust includes.
55 * c-aux-info.c: Likewise.
56 * c-convert.c: Likewise.
57 * c-decl.c: Likewise.
58 * c-errors.c: Likewise.
59 * c-lang.c: Likewise.
60 * c-objc-common.c: Likewise.
61 * c-parser.c: Likewise.
62 * c-typeck.c: Likewise.
63
da2e71c9
MLI
642015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
65
66 PR fortran/66605
67 * c-decl.c (finish_function): Call do_warn_unused_parameter.
68
b155cfd9
MP
692015-06-29 Marek Polacek <polacek@redhat.com>
70
71 PR c/66322
72 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
73 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
74 about -Wswitch-bool here.
75 (do_case): Update c_add_case_label call.
76 (c_finish_case): Update c_do_switch_warnings call.
77
31521951
MP
782015-06-27 Marek Polacek <polacek@redhat.com>
79
80 * c-typeck.c: Use VECTOR_TYPE_P throughout.
81
22d03525
MP
822015-06-26 Marek Polacek <polacek@redhat.com>
83
84 * c-array-notation.c (fix_builtin_array_notation_fn): Use
85 INDIRECT_REF_P.
86 * c-typeck.c (array_to_pointer_conversion): Likewise.
87 (build_unary_op): Likewise.
88 (c_finish_return): Likewise.
89
f0889939
AM
902015-06-25 Andrew MacLeod <amacleod@redhat.com>
91
92 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
93 * c-parser.c: Likewise.
94
8d67ee55
RS
952015-06-25 Richard Sandiford <richard.sandiford@arm.com>
96
97 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
98 instead of pointer_hash.
99 (detect_field_duplicates): Likewise.
100
0ae9bd27
MP
1012015-06-25 Marek Polacek <polacek@redhat.com>
102
103 * c-array-notation.c: Use VAR_P throughout.
104 * c-decl.c: Likewise.
105 * c-objc-common.c: Likewise.
106 * c-parser.c: Likewise.
107 * c-typeck.c: Likewise.
108
62f9079a
MP
1092015-06-25 Marek Polacek <polacek@redhat.com>
110
111 * c-decl.c: Use is_global_var throughout.
112 * c-parser.c: Likewise.
113 * c-typeck.c: Likewise.
114
abb226c9
AM
1152015-06-17 Andrew MacLeod <amacleod@redhat.com>
116
117 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
118 * c-aux-info.c: Likewise.
119 * c-convert.c: Likewise.
120 * c-decl.c: Likewise.
121 * c-errors.c: Likewise.
122 * c-lang.c: Likewise.
123 * c-objc-common.c: Likewise.
124 * c-parser.c: Likewise.
125 * c-typeck.c: Likewise.
126
8cbababc
JH
1272015-06-11 Jan Hubicka <hubicka@ucw.cz>
128
129 PR middle-end/66325
130 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
131 variants.
132
a0349665
PMR
1332015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
134
135 * c-decl.c (pop_scope): Register the main translation unit
136 through the new debug hook.
137
13fdf2e2
AM
1382015-06-08 Andrew MacLeod <amacleod@redhat.com>
139
140 * c-array-notation.c : Adjust include files.
141 * c-aux-info.c : Likewise.
142 * c-convert.c : Likewise.
143 * c-decl.c : Likewise.
144 * c-errors.c : Likewise.
145 * c-lang.c : Likewise.
146 * c-lang.h : Likewise.
147 * c-objc-common.c : Likewise.
148 * c-parser.c : Likewise.
149 * c-typeck.c : Likewise.
150
d7438551
AH
1512015-06-05 Aldy Hernandez <aldyh@redhat.com>
152
153 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
154 immediately clobber it.
155 (c_write_global_declarations_1): Remove call to
156 check_global_declaration_1.
157 (c_write_global_declarations_2): Remove.
158 (c_write_final_cleanups): Rename from c_write_global_declarations.
159 Remove call to finalize_compilation_unit.
160 Remove calls to debugging hooks.
161 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
162 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
163 * c-tree.h: Remove c_write_global_declarations.
164
ecb9f223
AM
1652015-06-04 Andrew MacLeod <amacleod@redhat.com>
166
167 * c-array-notation.c: Adjust includes for restructured coretypes.h.
168 * c-aux-info.c: Likewise.
169 * c-convert.c: Likewise.
170 * c-decl.c: Likewise.
171 * c-errors.c: Likewise.
172 * c-lang.c: Likewise.
173 * c-objc-common.c: Likewise.
174 * c-parser.c: Likewise.
175 * c-typeck.c: Likewise.
176
9482b620
MP
1772015-06-04 Marek Polacek <polacek@redhat.com>
178
179 PR c/66341
180 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
181 it is a lvalue.
182
bc51ace3
PK
1832015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
184
185 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
186 Warn for empty struct.
187 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
188
ea5b45b6
AT
1892015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
190
191 * c-decl.c (start_function): Call plugin before parsing.
192 (finish_function): Call plugin after parsing.
193
c2d47482
PK
1942015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
195
196 PR c/49551
197 * c-decl.c (merge_decls): Merge DECL_COMMON.
198
a95492ab
JW
1992015-05-22 Jim Wilson <jim.wilson@linaro.org>
200
201 * Make-lang.in (check_gcc_pallelize): Define.
202
fd5c817a
MP
2032015-05-22 Marek Polacek <polacek@redhat.com>
204
205 PR c/47043
206 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
207 attributes.
208
c7b70a3c
MP
2092015-05-21 Marek Polacek <polacek@redhat.com>
210
211 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
212 DECL_BUILT_IN.
213
21b634ae
MP
2142015-05-20 Marek Polacek <polacek@redhat.com>
215
216 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
217 * c-typeck.c: Likewise.
218
296a8c2f
MP
2192015-05-19 Marek Polacek <polacek@redhat.com>
220
221 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
222
41b37d5e
JJ
2232015-05-19 Jakub Jelinek <jakub@redhat.com>
224
225 PR middle-end/66199
226 * c-parser.c (c_parser_omp_for_loop): Don't add
227 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
228 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
229 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
230 constructs.
231
fab27f52
MM
2322015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
233
234 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 235 swaps.
fab27f52 236
40de31cf
MLI
2372015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
238
239 PR fortran/44054
240 * c-objc-common.c (c_tree_printer): Replace locus pointer with
241 accessor function.
242
3aa3c9fc
MP
2432015-05-14 Marek Polacek <polacek@redhat.com>
244
245 PR c/66066
246 PR c/66127
247 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
248 rather than with 0.
249
c3388e62
DM
2502015-05-12 David Malcolm <dmalcolm@redhat.com>
251
252 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
253 to add a call to warn_for_misleading_indentation.
254 (c_parser_else_body): Likewise, adding param "else_loc".
255 (c_parser_if_statement): Check for misleading indentation.
256 (c_parser_while_statement): Likewise.
257 (c_parser_for_statement): Likewise.
258
755e528f
MP
2592015-05-08 Marek Polacek <polacek@redhat.com>
260
261 PR c/64918
262 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
263 (output_init_element): Likewise.
264
0173bd2a
MP
2652015-05-07 Marek Polacek <polacek@redhat.com>
266
267 PR c/65179
268 * c-typeck.c (build_binary_op): Warn when left shifting a negative
269 value.
270
9babc352
MP
2712015-04-30 Marek Polacek <polacek@redhat.com>
272
273 * c-typeck.c (set_init_label): Call error_at instead of error and
274 pass LOC to it.
275
ac9f18db
MP
276 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
277 the type of a decl.
278
ec3fba51
MP
279 * c-typeck.c (c_build_va_arg): Clarify the error message.
280
b811915d
TS
2812015-04-29 Thomas Schwinge <thomas@codesourcery.com>
282
283 * c-parser.c (c_parser_oacc_enter_exit_data): Use
284 OMP_STANDALONE_CLAUSES.
285
f3075008
MP
2862015-04-28 Marek Polacek <polacek@redhat.com>
287
288 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
289
4e81b788
MP
2902015-04-28 Marek Polacek <polacek@redhat.com>
291
292 PR c/65901
293 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
294
6c1db78e
MP
2952015-04-25 Marek Polacek <polacek@redhat.com>
296
297 PR c/52085
298 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
299 attribute.
300
5c4abbb8
MP
3012015-04-23 Marek Polacek <polacek@redhat.com>
302
303 PR c/65345
304 * c-decl.c (set_labels_context_r): New function.
305 (store_parm_decls): Call it via walk_tree_without_duplicates.
306 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
307 instead of create_tmp_var. Build TARGET_EXPR instead of
308 COMPOUND_EXPR.
309 (build_atomic_assign): Use create_tmp_var_raw instead of
310 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
311
06aca1d5
IV
3122015-04-20 Ilya Verbin <ilya.verbin@intel.com>
313
314 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
315 (c_parser_omp_target_update): Add missed %> to error_at ().
316
8fba1830
BRF
3172015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
318
319 PR target/55143
320 * c-decl.c (c_default_pointer_mode): Remove definition.
321 * c-tree.h (c_default_pointer_mode): Remove declaration.
322
62021f64
TB
3232015-03-27 Tobias Burnus <burnus@net-b.de>
324
325 PR c/65586
326 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
327 error out.
328 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
329 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
330 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
331
9b65e171
JJ
3322015-03-19 Jakub Jelinek <jakub@redhat.com>
333
334 * c-decl.c (c_decl_attributes): Also add "omp declare target"
335 attribute for DECL_EXTERNAL VAR_DECLs.
336
17958621
JJ
3372015-03-11 Jakub Jelinek <jakub@redhat.com>
338
339 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
340 argument.
341
7ccb1a11
JJ
3422015-03-10 Jakub Jelinek <jakub@redhat.com>
343
344 PR c/65120
345 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
346 before preparing arguments to warn_logical_not_parentheses.
347
01177669
JJ
3482015-03-09 Jakub Jelinek <jakub@redhat.com>
349
350 PR c/65120
351 * c-typeck.c (parser_build_binary_op): Don't warn for
352 !!x == y or !b == y where b is _Bool.
353
802ac282
MP
3542015-03-09 Marek Polacek <polacek@redhat.com>
355
356 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
357 * c-decl.c (grokdeclarator): Likewise.
358 * c-typeck.c (build_binary_op): Likewise.
359
e5165b60
MP
3602015-02-27 Marek Polacek <polacek@redhat.com>
361
362 PR c/65228
363 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
364
065d214c
MP
3652015-02-14 Marek Polacek <polacek@redhat.com>
366
367 PR c/64768
368 * c-decl.c (grokdeclarator): Set the range of a flexible array member
369 declared through a typedef name.
370
e5d9235b
MP
3712015-02-13 Marek Polacek <polacek@redhat.com>
372
373 PR c/65050
374 * c-decl.c (grokdeclarator): Print also the type when giving
375 the error message about array's incomplete element type.
376
fa01ffcc
JJ
3772015-02-11 Jakub Jelinek <jakub@redhat.com>
378
379 PR c/64824
380 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
381 check in the POP macro.
382
c3e38a03
MP
3832015-02-09 Marek Polacek <polacek@redhat.com>
384
385 PR c/64856
386 * c-typeck.c (process_init_element): Don't always wrap
387 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
388 initializing a range of elements.
389
4886ec8e
JJ
3902015-02-04 Jakub Jelinek <jakub@redhat.com>
391
392 PR c/64824
393 PR c/64868
394 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
395
c3e38a03 3962015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
397
398 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
399 processing enum declaration.
400
7b33f0c8
MP
4012015-01-29 Marek Polacek <polacek@redhat.com>
402
403 PR c/64709
404 * c-typeck.c (pop_init_level): If constructor_elements has
405 exactly one element with integer_zerop value, set constructor_zeroinit
406 to 1. Remove braces around warning_init call.
407
dea63e49
JJ
4082015-01-27 Jakub Jelinek <jakub@redhat.com>
409
410 PR c/64766
411 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
412 of FUNCTION_DECLs with error_mark_node.
413
d38f7dce
JJ
4142015-01-26 Jakub Jelinek <jakub@redhat.com>
415
416 PR c/64778
417 * c-typeck.c (convert_arguments): Return -1 if there are
418 error_args, even if we've diagnosed too many arguments.
419
cbf5d0e7
RB
4202015-01-21 Richard Biener <rguenther@suse.de>
421
422 PR middle-end/64313
423 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
424 for builtins the user declared correctly.
425
41dbbb37
TS
4262015-01-15 Thomas Schwinge <thomas@codesourcery.com>
427 Bernd Schmidt <bernds@codesourcery.com>
428 Cesar Philippidis <cesar@codesourcery.com>
429 James Norris <jnorris@codesourcery.com>
430 Jakub Jelinek <jakub@redhat.com>
431 Ilmir Usmanov <i.usmanov@samsung.com>
432
433 * c-parser.c: Include "gomp-constants.h".
434 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
435 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
436 Use OMP_CLAUSE_SET_MAP_KIND.
437 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
438 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
439 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
440 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
441 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
442 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
443 "copyout", "create", "delete", "deviceptr", "gang", "host",
444 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
445 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
446 "present_or_create", "pcreate", "seq", "self", "vector",
447 "vector_length", "wait", "worker".
448 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
449 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
450 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
451 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
452 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
453 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
454 (c_parser_oacc_data_clause_deviceptr)
455 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
456 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
457 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
458 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
459 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
460 (c_parser_oacc_parallel, c_parser_oacc_update)
461 (c_parser_oacc_wait): New functions.
462 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
463 (c_finish_oacc_data): New prototypes.
464 * c-typeck.c: Include "gomp-constants.h".
465 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
466 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
467 OMP_CLAUSE_SET_MAP_KIND.
468 (c_finish_oacc_parallel, c_finish_oacc_kernels)
469 (c_finish_oacc_data): New functions.
470 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
471 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
472 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
473 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
474 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
475 GOMP_MAP_FORCE_DEVICEPTR.
476
adfac8df
JJ
4772015-01-09 Michael Collison <michael.collison@linaro.org>
478
479 * c-array-notation.c: Include hash-set.h, machmode.h,
480 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
481 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
482 * c-aux-info.c: Ditto.
483 * c-convert.c: Ditto.
484 * c-decl.c: Ditto.
485 * c-errors.c: Ditto.
486 * c-lang.c: Dittoxs.
487 * c-objc-common.c: Ditto.
488 * c-parser.c: Ditto.
489 * c-typeck.c: Include hash-set.h, machmode.h,
490 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
491 fold-const.h, wide-int.h, inchash.h, real.h and
492 fixed-value.h due to flattening of tree.h.
493
2cc901dc
MP
4942015-01-07 Marek Polacek <polacek@redhat.com>
495
496 PR c/64417
497 * c-typeck.c (process_init_element): Disallow initialization of
498 a flexible array member with a string constant if the structure
499 is in an array.
500
5624e564
JJ
5012015-01-05 Jakub Jelinek <jakub@redhat.com>
502
e5341100
JJ
503 PR sanitizer/64344
504 * c-typeck.c (convert_for_assignment, c_finish_return): For
505 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
506 types also set in_late_binary_op around convert call.
507 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
508 to integral type casts, if not in_late_binary_op, pass c_fully_fold
509 result on expr as last argument to ubsan_instrument_float_cast,
510 if in_late_binary_op, don't use c_save_expr but save_expr.
511
5624e564
JJ
512 Update copyright years.
513
5bd012f8
MP
5142015-01-05 Marek Polacek <polacek@redhat.com>
515
516 PR c/64423
517 * c-typeck.c (build_array_ref): Pass loc down to
518 warn_array_subscript_with_type_char.
519
768952be
MU
5202014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
521
522 * c-typeck.c: New behavious for pointers to arrays with qualifiers
523 (common-pointer-type): For pointers to arrays take qualifiers from
524 element type.
525 (build_conditional_expr): Add warnings for lost qualifiers.
526 (comp-target-types): Allow pointers to arrays with different qualifiers.
527 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
528 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
529 to PEDWARN_FOR_QUALIFIERS.
530
8f94a8c4
JJ
5312014-12-17 Jakub Jelinek <jakub@redhat.com>
532
533 PR sanitizer/64289
534 * c-convert.c: Include ubsan.h.
535 (convert): For real -> integral casts and
536 -fsanitize=float-cast-overflow don't call convert_to_integer, but
537 instead instrument the float cast directly.
538
b731b390
JJ
5392014-11-29 Jakub Jelinek <jakub@redhat.com>
540
541 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
542 c_finish_stmt_expr): Remove NULL last argument from
543 create_tmp_var_raw and create_tmp_var calls.
544 * c-array-notation.c (fix_builtin_array_notation_fn,
545 build_array_notation_expr, fix_conditional_array_notations_1,
546 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
547
541e35a6
MP
5482014-11-28 Marek Polacek <polacek@redhat.com>
549
550 PR c/63862
551 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
552 convert the right operand to integer type.
553
b286be94
MP
5542014-11-25 Marek Polacek <polacek@redhat.com>
555
556 PR c/63877
557 * c-decl.c (start_function): Disable -Wmissing-declarations warning
558 for inline functions.
559
aa7da51a
JJ
5602014-11-21 Jakub Jelinek <jakub@redhat.com>
561
562 PR target/63764
563 * c-typeck.c (build_array_ref): Adjust
564 convert_vector_to_pointer_for_subscript caller. If it returns true,
565 call non_lvalue_loc on the result.
566
d876207f
RB
5672014-11-11 Richard Biener <rguenther@suse.de>
568
569 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
570 to true.
571
e5e44252
AK
5722014-11-10 Andi Kleen <ak@linux.intel.com>
573
574 PR c/60804
575 * c-parser.c (c_parser_statement_after_labels): Call
576 check_no_cilk.
577 (c_parser_if_statement): Dito.
578 (c_parser_switch_statement): Dito.
579 (c_parser_while_statement): Dito.
580 (c_parser_do_statement): Dito.
581 (c_parser_for_statement): Dito.
582 * c-typeck.c (c_finish_loop): Dito.
583
13c21655
PC
5842014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
585
586 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
587 OPT_Wshift_count_overflow in the warnings.
588
2d51fcef
MP
5892014-10-30 Marek Polacek <polacek@redhat.com>
590
591 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
592 print the stripped version as well, if they're not the same.
593
ef4bddc2
RS
5942014-10-29 Richard Sandiford <richard.sandiford@arm.com>
595
596 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
597 machine_mode.
598
c582198b
AM
5992014-10-28 Andrew MacLeod <amacleod@redhat.com>
600
601 * c-decl.c: Adjust include files.
602 * c-parser.c: Ditto.
603
ddc8de03
PM
6042014-10-27 Phil Muldoon <pmuldoon@redhat.com>
605 Tom Tromey <tromey@redhat.com>
606
607 * c-tree.h (enum c_oracle_request): New.
608 (c_binding_oracle_function): New typedef.
609 (c_binding_oracle, c_pushtag, c_bind): Declare.
610 * c-decl.c (c_binding_oracle): New global.
611 (I_SYMBOL_CHECKED): New macro.
612 (i_symbol_binding): New function.
613 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
614 (I_TAG_CHECKED): New macro.
615 (i_tag_binding): New function.
616 (I_TAG_BINDING, I_TAG_DECL): Redefine.
617 (I_LABEL_CHECKED): New macro.
618 (i_label_binding): New function.
619 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
620 (c_print_identifier): Save and restore c_binding_oracle.
621 (c_pushtag, c_bind): New functions.
622
60393bbc
AM
6232014-10-27 Andrew MacLeod <amacleod@redhat.com>
624
625 * c-typeck.c: Adjust include files.
626
d723bb7c
MLI
6272014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
628
629 PR c++/53061
630 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
631 initialization here...
632 (c_initialize_diagnostics): ... but here. Set defaults after
633 building pretty-printer.
634
1bc5a451
MP
6352014-10-23 Marek Polacek <polacek@redhat.com>
636
637 PR c/63626
638 * c-decl.c (pop_scope): Don't print warning in external_scope.
639
4435bb92
MP
6402014-10-19 Marek Polacek <polacek@redhat.com>
641
642 PR c/63567
643 * c-typeck.c (output_init_element): Allow initializing objects with
644 static storage duration with compound literals even in C99 and add
645 pedwarn for it.
646
7278465e
MP
6472014-10-17 Marek Polacek <polacek@redhat.com>
648
649 PR c/63567
650 * c-typeck.c (digest_init): Allow initializing objects with static
651 storage duration with compound literals even in C99 and add pedwarn
652 for it.
653
d9b7be2e
MP
6542014-10-17 Marek Polacek <polacek@redhat.com>
655
656 PR c/63543
657 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
658 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
659 error multiple times. Print the type.
660
f406ae1f
MP
6612014-10-17 Marek Polacek <polacek@redhat.com>
662
663 PR c/63549
664 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
665 type.
666
92574c7c
MP
6672014-10-17 Marek Polacek <polacek@redhat.com>
668
669 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
670 (start_function): Use OPT_Wimplicit_int instead of 0.
671 (store_parm_decls_oldstyle): Likewise.
672
1bc4a978
MT
6732014-10-17 Alan Modra <amodra@gmail.com>
674
675 PR middle-end/61848
676 * c-decl.c (merge_decls): Don't merge section name or tls model
677 to newdecl symtab node, instead merge to olddecl. Override
678 existing olddecl section name. Set tls_model for all thread-local
679 vars, not just OMP thread-private ones. Remove incorrect comment.
680
83685514
AM
6812014-10-16 Andrew MacLeod <amacleod@redhat.com>
682
683 * c-decl.c: Adjust include files.
684
78a7c317
DD
6852014-10-14 DJ Delorie <dj@redhat.com>
686
687 * c-parser.c (c_parse_init): Add RID entries for each __intN.
688 (c_token_starts_typename): Check all __intN, not just __int128.
689 (c_token_starts_declspecs): Likewise.
690 (c_parser_declspecs): Likewise.
691 (c_parser_attribute_any_word): Likewise.
692 (c_parser_objc_selector): Likewise.
693 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
694 (struct c_declspecs): Add int_n_idx field to record *which* __intN
695 is specified.
696 * c-decl.c (declspecs_add_type): Check for all __intN, not just
697 __int128.
698 (finish_declspecs): Likewise.
699
74d98c1e
AB
7002014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
701
702 * c-parser.c (c_parser_all_labels): New function to replace
703 the duplicate code.
704 (c_parser_statement): Call the new function.
705
84937de2
MP
7062014-10-09 Marek Polacek <polacek@redhat.com>
707
708 PR c/63480
709 * c-typeck.c (pop_init_level): Don't warn about initializing
710 with { }.
711
0382aaa0
MP
7122014-10-07 Marek Polacek <polacek@redhat.com>
713
714 PR c/59717
715 * c-decl.c (header_for_builtin_fn): New function.
716 (implicitly_declare): Suggest which header to include.
717
7a0ca710
MP
7182014-10-07 Marek Polacek <polacek@redhat.com>
719
720 * c-convert.c (convert): Use error_operand_p.
721 * c-typeck.c (require_complete_type): Likewise.
722 (really_atomic_lvalue): Likewise.
723 (digest_init): Likewise.
724 (handle_omp_array_sections_1): Likewise.
725
6bc8a126
MP
7262014-10-03 Marek Polacek <polacek@redhat.com>
727
728 PR c/63453
729 * c-decl.c (pop_scope): Don't warn about "inline function declared
730 but never defined" for functions marked with gnu_inline attribute.
731
d90c0a59
JJ
7322014-09-25 Jakub Jelinek <jakub@redhat.com>
733
734 PR c++/63249
735 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
736 on low_bound and length.
737
083e891e
MP
7382014-09-24 Marek Polacek <polacek@redhat.com>
739
740 PR c/61405
741 PR c/53874
742 * c-parser.c: Don't define CPP_KEYWORD.
743 (c_parser_switch_statement): Pass original type to c_finish_case.
744 * c-tree.h (c_finish_case): Update declaration.
745 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
746 conditionally to c_do_switch_warnings.
747
8d95fe25
MP
7482014-09-03 Marek Polacek <polacek@redhat.com>
749
750 PR c/62024
751 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
752 conversions.
753
9a771876
JJ
7542014-09-02 Jakub Jelinek <jakub@redhat.com>
755 Balaji V. Iyer <balaji.v.iyer@intel.com>
756 Igor Zamyatin <igor.zamyatin@intel.com>
757
758 * c-parser.c (c_parser_cilk_for): New function.
759 (c_parser_cilk_grainsize): Likewise.
760 (c_get_temp_regvar): Likewise.
761 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
762 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
763 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
764 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
765 case.
766
b7679d96
CG
7672014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
768
769 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
770 with using HOST_WIDE_INT without truncation to 'int'
771
59ea0364
MP
7722014-08-22 Marek Polacek <polacek@redhat.com>
773
774 PR c++/62199
775 * c-typeck.c (parser_build_binary_op): Adjust call to
776 warn_logical_not_parentheses.
777
671a475e
IZ
7782014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
779
780 PR other/62008
781 * c-parser.c (c_parser_array_notation): Check for correct
782 type of an array added.
783
04159acf
MP
7842014-08-19 Marek Polacek <polacek@redhat.com>
785
786 PR c++/62153
787 * c-typeck.c (build_binary_op): If either operand of a comparison
788 is a boolean expression, call maybe_warn_bool_compare.
789
c77935ee
PP
7902014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
791
792 PR c/45584
793 * c-typeck.c (build_c_cast): Do a conversion even when the
794 TYPE_MAIN_VARIANTs are the same.
795
35aff4fb
MP
7962014-08-19 Marek Polacek <polacek@redhat.com>
797
798 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
799 pedwarn_c99 instead of pedwarn.
800 (grokfield): Likewise.
801 (warn_defaults_to): New function.
802 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
803 Unconditionally call pedwarn_c99 instead of pedwarn.
804 (start_function): Call warn_defaults_to instead of pedwarn_c99.
805 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
806 check flag_isoc11 before.
807 * c-errors.c (pedwarn_c99): Change the return type to bool.
808 Handle -Wc99-c11-compat.
809 * c-parser.c (disable_extension_diagnostics): Handle
810 warn_c99_c11_compat.
811 (restore_extension_diagnostics): Likewise.
812 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
813 instead of pedwarn, don't check flag_isoc11 before.
814 (c_parser_declspecs): Likewise.
815 (c_parser_alignas_specifier): Likewise.
816 (c_parser_alignof_expression): Likewise.
817 (c_parser_generic_selection): Likewise.
818 * c-tree.h (pedwarn_c99): Update declaration.
819 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
820 of pedwarn_c99.
821
177cce46
MP
8222014-08-19 Marek Polacek <polacek@redhat.com>
823
824 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
825 to pedwarn_c90.
826 * c-errors.c: Include "opts.h".
827 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
828 * c-parser.c (disable_extension_diagnostics): Handle negative value
829 of warn_c90_c99_compat, too.
830 (restore_extension_diagnostics): Likewise.
831 (c_parser_compound_statement_nostart): Pass
832 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
833
6dc99c33
MP
8342014-08-12 Marek Polacek <polacek@redhat.com>
835
836 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
837 Add pedwarn.
838 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
839 Likewise.
840 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
841
f3bede71
MP
8422014-08-10 Marek Polacek <polacek@redhat.com>
843
844 PR c/51849
845 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
846 Call pedwarn_c90 instead of pedwarn.
847 (check_bitfield_type_and_width): Likewise.
848 (declspecs_add_qual): Likewise.
849 (declspecs_add_type): Likewise.
850 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
851 Adjust to only call pedwarn_c90.
852 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
853 pedwarn_c90 instead of pedwarn.
854 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
855 * c-parser.c (disable_extension_diagnostics): Handle
856 warn_c90_c99_compat.
857 (restore_extension_diagnostics): Likewise.
858 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
859 pedwarn_c90 instead of pedwarn.
860 (c_parser_initelt): Likewise.
861 (c_parser_postfix_expression): Likewise.
862 (c_parser_postfix_expression_after_paren_type): Likewise.
863 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
864 * c-tree.h: Fix formatting.
865 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
866 pedwarn_c90 instead of pedwarn.
867
9f25a338
TS
8682014-08-07 Trevor Saunders <tsaunders@mozilla.com>
869
870 * c-typeck.c: Remove include of pointer-set.h.
871
044331a8
MP
8722014-08-07 Marek Polacek <polacek@redhat.com>
873
874 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
875
b787e7a2
TS
8762014-08-02 Trevor Saunders <tsaunders@mozilla.com>
877
878 * c-typeck.c: Use hash_map instead of pointer_map.
879
6e2830c3
TS
8802014-08-02 Trevor Saunders <tsaunders@mozilla.com>
881
882 * c-decl.c: Use hash_set instead of pointer_set.
883
a7ee52fb
IZ
8842014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
885
886 PR middle-end/61455
887 * c-array-notation.c (expand_array_notations): Handling
888 of DECL_EXPR added.
889
b4dfdc11
MG
8902014-07-31 Marc Glisse <marc.glisse@inria.fr>
891
892 PR c++/60517
893 * c-typeck.c (c_finish_return): Return 0 instead of the address of
894 a local variable.
895
976d5a22
TT
8962014-07-30 Tom Tromey <tromey@redhat.com>
897
898 * c-typeck.c (struct constructor_stack) <designator_depth>: New
899 field.
900 (really_start_incremental_init, push_init_level): Initialize
901 designator_depth.
902 (pop_init_level): Set global designator_depth.
903 (process_init_element): Check for designated_init attribute.
904
30281de2
MP
9052014-07-20 Marek Polacek <polacek@redhat.com>
906
907 PR c/61852
908 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
909 (implicitly_declare): Pass location to implicit_decl_warning.
910
b108f48f
JJ
9112014-07-14 Jakub Jelinek <jakub@redhat.com>
912
913 PR middle-end/61294
914 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
915 If non-NULL, call c_parser_check_literal_zero.
916 (c_parser_check_literal_zero): New function.
917 (c_parser_postfix_expression_after_primary): Adjust
918 c_parser_expr_list caller, handle -Wmemset-transposed-args.
919
773ec47f
MP
9202014-07-06 Marek Polacek <polacek@redhat.com>
921
922 PR c/6940
923 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
924 * c-tree.h (C_ARRAY_PARAMETER): Define.
925 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
926 function parameter.
927
22e1cf1c
JH
9282014-07-02 Jan Hubicka <hubicka@ucw.cz>
929 Chen Gang <gang.chen.5i5j@gmail.com>
930
931 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
932 releasing symbol.
933
52ec0ea3
MP
9342014-07-01 Marek Polacek <polacek@redhat.com>
935
936 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
937 instead of 0 to WARN_FOR_ASSIGNMENT.
938
d5c3d343
MP
9392014-07-01 Marek Polacek <polacek@redhat.com>
940
941 PR c/58286
942 * c-typeck.c (convert_for_assignment): Pass
943 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
944
6a7253a4
MP
9452014-06-30 Marek Polacek <polacek@redhat.com>
946
947 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
948 has no_sanitize_undefined attribute.
949
5e88a8f4
IZ
9502014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
951
952 PR middle-end/57541
953 * c-array-notation.c (fix_builtin_array_notation_fn):
954 Check for 0 arguments in builtin call. Check that bultin argument is
955 correct.
956 * c-parser.c (c_parser_array_notation): Check for incorrect initial
957 index.
958
9698b078
SH
9592014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
960
961 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
962 qualifiers in __auto_type for atomic types.
963 (c_parser_typeof_specifier): Discard all type qualifiers in
964 __typeof__ for atomic types.
965
6e07c515
MP
9662014-06-25 Marek Polacek <polacek@redhat.com>
967
968 PR c/61162
969 * c-parser.c (c_parser_statement_after_labels): Pass the location of
970 the return expression to c_finish_return.
971
da6f124d
JJ
9722014-06-25 Jakub Jelinek <jakub@redhat.com>
973
974 * c-typeck.c (c_finish_omp_clauses): Make sure
975 OMP_CLAUSE_LINEAR_STEP has correct type.
976
c203e8a7
TS
9772014-06-24 Trevor Saunders <tsaunders@mozilla.com>
978
979 * c-decl.c: Adjust.
980
56ad0e38
JJ
9812014-06-24 Jakub Jelinek <jakub@redhat.com>
982
983 * c-parser.c (c_parser_omp_for_loop): For
984 #pragma omp parallel for simd move lastprivate clause from parallel
985 to for rather than simd.
986
47c2554f
MP
9872014-06-23 Marek Polacek <polacek@redhat.com>
988
989 * c-typeck.c (parser_build_binary_op): Don't call
990 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
991
56363ffd
JH
9922014-06-15 Jan Hubicka <hubicka@ucw.cz>
993
994 * c-parser.c (c_parser_omp_threadprivate): Likewise.
995 * c-decl.c (merge_decls): Likewise.
996
d7ff7ae5
MP
9972014-06-09 Marek Polacek <polacek@redhat.com>
998
999 PR c/36446
1000 * c-typeck.c (error_init): Call inform instead of error_at.
1001 (pedwarn_init): Call inform instead of pedwarn.
1002 (warning_init): Call inform instead of warning_at.
1003
24d047a3
JH
10042014-06-07 Jan Hubicka <hubicka@ucw.cz>
1005
1006 * c-decl.c (merge_decls): Use set_decl_section_name.
1007 (duplicate_decls): Remove node if it exists.
1008
9bac5cbb
G
10092014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1010
1011 PR c/53119
1012 * c-typeck.c (push_init_level, process_init_element,
1013 pop_init_level): Correct check for zero initialization, move
1014 missing brace warning to respect zero initialization.
1015
8ffcdea8
MP
10162014-06-05 Marek Polacek <polacek@redhat.com>
1017
1018 PR c/56724
1019 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1020
742938c9
MP
10212014-06-05 Marek Polacek <polacek@redhat.com>
1022
1023 PR c/49706
1024 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1025 on the left hand side operand of a comparison.
1026
6447c55d
MP
10272014-06-05 Marek Polacek <polacek@redhat.com>
1028
1029 PR c/48062
1030 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1031 Print note only if the warning was printed.
1032
9dc7743c
IZ
10332014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1034
1035 PR c/58942
1036 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1037 with a pointer.
1038
fedfecef
MP
10392014-06-03 Marek Polacek <polacek@redhat.com>
1040
1041 PR c/60439
1042 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1043 c_start_case.
1044 * c-tree.h (c_start_case): Update.
1045 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1046 switch condition has boolean value.
1047
9b2b7279
AM
10482014-06-02 Andrew MacLeod <amacleod@redhat.com>
1049
1050 * c-decl.c: Include builtins.h.
1051 * c-parser.c: Likewise.
1052
5c1bc275
MP
10532014-05-27 Marek Polacek <polacek@redhat.com>
1054
1055 PR c/56724
1056 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1057 error and warning calls to error_at and warning_at. Pass location of
1058 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1059 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1060 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1061
97563bc8
IZ
10622014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1063
1064 PR c/61191
1065 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1066 function parameters.
1067
aede2c10
JH
10682014-05-23 Jan Hubicka <hubicka@ucw.cz>
1069
1070 * c-decl.c (merge_decls): Preserve symtab node pointers.
1071 (duplicate_decls): Free new decl.
1072
edbba2ce
TS
10732014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1074
f3316c6d
TS
1075 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1076 initialization.
1077
edbba2ce
TS
1078 * c-parser.c (c_parser_omp_target): Return bool values.
1079
68c81f24
TS
10802014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1081
1082 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1083 num_teams_loc variable to num_thread_limit_loc.
1084
632f2871
RS
10852014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1086
1087 * c-array-notation.c (expand_array_notations): Use void_node
1088 instead of void_zero_node.
1089
766090c2
TS
10902014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1091
1092 * c-decl.c (finish_struct): Adjust.
1093 (finish_enum): Likewise.
1094 (bind): Adjust.
1095 (record_inline_static): Likewise.
1096 (push_scope): Likewise.
1097 (make_label): Likewise.
1098 (lookup_label_for_goto): Likewise.
1099 (finish_struct): Likewise.
1100 (finish_enum): Likewise.
1101 (store_parm_decls): Likewise.
1102 (c_push_function_context): Likewise.
1103 * c-lang.h: Remove usage of variable_size gty attribute.
1104 * c-parser.c (c_parse_init): Adjust.
1105 (c_parse_file): Likewise.
1106
2b107f6b
MP
11072014-05-13 Marek Polacek <polacek@redhat.com>
1108
1109 PR c/61162
1110 * c-typeck.c (convert_for_assignment): Pass location to
1111 WARN_FOR_ASSIGNMENT instead of input_location.
1112
d033409e
MP
11132014-05-10 Marek Polacek <polacek@redhat.com>
1114
1115 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1116 maybe_warn_string_init.
1117 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1118 maybe_warn_string_init.
1119 * c-tree.h (maybe_warn_string_init): Update declaration.
1120 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1121 Call pedwarn_init with loc instead of with input_location.
1122 (digest_init): Pass init_loc to maybe_warn_string_init.
1123 (pop_init_level): Call pedwarn_init with loc instead of with
1124 input_location.
1125 (set_init_index): Likewise.
1126 (process_init_element): Likewise.
1127
ea58ef42
MP
11282014-05-09 Marek Polacek <polacek@redhat.com>
1129
1130 PR c/61096
1131 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1132 (c_parser_initelt): Pass location to set_init_label. Pass array index
1133 location to set_init_index.
1134 * c-tree.h (push_init_level): Update declaration.
1135 (pop_init_level): Likewise.
1136 (set_init_index): Likewise.
1137 (set_init_label): Likewise.
1138 * c-typeck.c (error_init): Add location parameter. Call error_at
1139 instead of error.
1140 (digest_init): Pass init_loc to error_init.
1141 (really_start_incremental_init):
1142 (push_init_level): Add location parameter. Pass loc to pop_init_level
1143 and error_init.
1144 (pop_init_level): Likewise.
1145 (set_designator): Add location parameter. Pass loc to pop_init_level,
1146 push_init_level, and error_init.
1147 (set_init_index): Add location parameter. Pass loc to error_init and
1148 set_designator.
1149 (set_init_label): Likewise.
1150 (output_init_element): Pass loc to error_init.
1151 (process_init_element): Pass loc to error_init, pop_init_level,
1152 pedwarn_init, and push_init_level.
1153
661a0813
MP
11542014-05-09 Marek Polacek <polacek@redhat.com>
1155
1156 PR c/50459
1157 * c-parser.c (c_parser_attributes): Parse the arguments as an
1158 expression-list if the attribute takes identifier.
1159
2793eeab
MP
11602014-05-08 Marek Polacek <polacek@redhat.com>
1161
1162 PR c/61053
1163 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1164 TYPE_ALIGN_UNIT.
1165
f827930a
MP
11662014-05-08 Marek Polacek <polacek@redhat.com>
1167
1168 PR c/61077
1169 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1170 of main.
1171
1d60af08
KZ
11722014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1173 Mike Stump <mikestump@comcast.net>
1174 Richard Sandiford <rdsandiford@googlemail.com>
1175
1176 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1177 (finish_enum): Use wide-int interfaces.
1178 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1179 * c-typeck.c (build_c_cast): Likewise.
1180 (set_nonincremental_init_from_string): Likewise.
1181 (c_tree_equal): Likewise.
1182
a0e24419
MP
11832014-05-02 Marek Polacek <polacek@redhat.com>
1184
1185 PR c/25801
1186 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1187 Return size_one_node when the type is not complete.
1188 (pointer_diff): Remove comment.
1189 (build_unary_op): Improve error messages.
1190
19fc9faa
MP
11912014-05-02 Marek Polacek <polacek@redhat.com>
1192
1193 * c-typeck.c (c_finish_return): Separate warning_at calls.
1194
63bc4e87
MP
11952014-05-02 Marek Polacek <polacek@redhat.com>
1196
1197 * c-tree.h (error_init): Remove declaration.
1198 (pedwarn_init): Likewise.
1199 * c-typeck.c (error_init): Make static and move above.
1200 (pedwarn_init): Likewise.
1201 (warning_init): Move above.
1202 (maybe_warn_string_init): Likewise.
1203
4bd2511b
JL
12042014-05-01 Jeff Law <law@redhat.com>
1205
1206 Revert:
1207
1208 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1209 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1210 avoid goto.
1211
6a358dcb
MP
12122014-05-02 Marek Polacek <polacek@redhat.com>
1213
1214 PR c/60784
1215 * c-typeck.c (push_init_level): Set constructor_designated to
1216 p->designated for structures.
1217
ae5ebda4
MP
12182014-05-01 Marek Polacek <polacek@redhat.com>
1219
1220 PR c/60915
1221 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1222 function-definition has an attribute after the declarator.
1223
96b40f8d
MP
12242014-05-01 Marek Polacek <polacek@redhat.com>
1225
1226 PR c/60257
1227 * c-typeck.c (warning_init): Add location_t parameter. Call
1228 warning_at instead of warning.
1229 (push_init_level): Pass input_location to warning_init.
1230 (add_pending_init): Add location_t parameter. Pass loc to
1231 warning_init.
1232 (set_nonincremental_init): Pass input_location to add_pending_init.
1233 (set_nonincremental_init_from_string): Likewise.
1234 (output_init_element): Pass loc to warning_init and to
1235 add_pending_init.
1236
32e00768
MP
12372014-05-01 Marek Polacek <polacek@redhat.com>
1238
1239 PR c/43395
1240 * c-typeck.c (c_finish_return): Distinguish between label and variable
1241 when warning about returning local address.
1242
c9379ce2
MP
12432014-05-01 Marek Polacek <polacek@redhat.com>
1244
1245 PR c/29467
1246 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1247 in C89 mode.
1248
d00887e8
MP
12492014-05-01 Marek Polacek <polacek@redhat.com>
1250
1251 PR c/43245
1252 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1253 instead of 0 to WARN_FOR_QUALIFIERS.
1254
5436fa2e
MP
12552014-05-01 Marek Polacek <polacek@redhat.com>
1256
1257 PR c/56989
1258 * c-typeck.c (default_conversion): Use better location for
1259 error call.
1260
f8ed5150
MP
12612014-04-30 Marek Polacek <polacek@redhat.com>
1262
1263 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1264 also when SANITIZE_FLOAT_DIVIDE is on.
1265
8337d1db
MP
12662014-04-30 Marek Polacek <polacek@redhat.com>
1267
1268 PR c/60139
1269 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1270 and pedwarn_init. Use loc insted of input_location.
1271
c4bdc42f
MP
12722014-04-30 Marek Polacek <polacek@redhat.com>
1273
1274 PR c/60351
1275 * c-typeck.c (build_binary_op): Use location when warning about
1276 shift count.
1277
45484dcf
MP
12782014-04-25 Marek Polacek <polacek@redhat.com>
1279
1280 PR c/18079
1281 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1282 always_inline/noinline and hot/cold attributes.
1283
34cf811f
MP
12842014-04-25 Marek Polacek <polacek@redhat.com>
1285
1286 PR c/60114
1287 * c-parser.c (c_parser_initelt): Pass input_location to
1288 process_init_element.
1289 (c_parser_initval): Pass loc to process_init_element.
1290 * c-tree.h (process_init_element): Adjust declaration.
1291 * c-typeck.c (push_init_level): Pass input_location to
1292 process_init_element.
1293 (pop_init_level): Likewise.
1294 (set_designator): Likewise.
1295 (output_init_element): Add location_t parameter. Pass loc to
1296 digest_init.
1297 (output_pending_init_elements): Pass input_location to
1298 output_init_element.
1299 (process_init_element): Add location_t parameter. Pass loc to
1300 output_init_element.
1301
42056eac
JJ
13022014-04-24 Jakub Jelinek <jakub@redhat.com>
1303
1304 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1305 atomic-clause, allow comma in between atomic-clause and
1306 seq_cst.
1307
e162a134
JJ
13082014-04-22 Jakub Jelinek <jakub@redhat.com>
1309
1310 PR c/59073
1311 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1312 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1313
2f6babac
IZ
13142014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1315
1316 PR middle-end/60469
1317 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1318 create_tmp_var instead build_decl for creating temps.
1319 (build_array_notation_expr): Likewise.
1320 (fix_conditional_array_notations_1): Likewise.
1321 (fix_array_notation_expr): Likewise.
1322 (fix_array_notation_call_expr): Likewise.
1323
8edbfaa6
JJ
13242014-03-28 Jakub Jelinek <jakub@redhat.com>
1325
1326 PR c++/60689
1327 * c-tree.h (c_build_function_call_vec): New prototype.
1328 * c-typeck.c (build_function_call_vec): Don't call
1329 resolve_overloaded_builtin here.
1330 (c_build_function_call_vec): New wrapper function around
1331 build_function_call_vec. Call resolve_overloaded_builtin here.
1332 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1333 Call c_build_function_call_vec instead of build_function_call_vec.
1334 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1335 * c-decl.c (finish_decl): Likewise.
1336
7485aeea
MLI
13372014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1338
1339 PR c/55383
1340 * c-typeck.c: Use correct format string in cast-qual warning
1341
b17a8b07
TS
13422014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1343
1344 * c-decl.c (c_decl_attributes): Use
1345 lang_hooks.types.omp_mappable_type.
1346 * c-typeck.c (c_finish_omp_clauses): Likewise.
1347
3af9c5e9
MP
13482014-03-06 Marek Polacek <polacek@redhat.com>
1349
1350 PR c/60197
1351 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1352 of checking tree code.
1353
1c9f5f33
PK
13542014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1355
1356 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1357 (c_parser_parameter_declaration): Likewise.
1358
cc28fc7f
MP
13592014-02-19 Marek Polacek <polacek@redhat.com>
1360
1361 PR c/60195
1362 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1363 Call mark_exp_read on exp.value.
1364 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1365 TREE_ADDRESSABLE on old instead of val.
1366 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1367
b581c05c
PK
13682014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1369
1370 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1371 C_EXPR_APPEND by vec_safe_push.
1372 * c-tree.h (C_EXPR_APPEND): Remove.
1373
81e5eca8
MP
13742014-01-31 Marek Polacek <polacek@redhat.com>
1375
1376 PR c/59963
1377 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1378 build_function_call_vec.
1379 (build_function_call): Likewise.
1380 (build_atomic_assign): Likewise.
1381 (build_function_call_vec): Add arg_loc parameter. Use it.
1382 (convert_arguments): Likewise.
1383 (convert_for_assignment): Rename rhs_loc to expr_loc.
1384 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1385 (c_parser_objc_keywordexpr): Likewise.
1386 (c_parser_postfix_expression_after_primary): Call
1387 build_function_call_vec with expr_loc rather than op_loc.
1388 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1389 build_function_call_vec.
1390 (c_parser_expr_list): Add locations parameter. Fill it with locations
1391 of function arguments.
1392 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1393
68fca595
MP
13942014-01-30 Marek Polacek <polacek@redhat.com>
1395
1396 PR c/59940
1397 * c-typeck.c (build_function_call_vec): Use loc parameter.
1398 (convert_arguments): Add location parameter. Use it.
1399 (ep_convert_and_check): Likewise.
1400 (build_atomic_assign): Adjust convert_for_assignment call.
1401 (build_modify_expr): Likewise.
1402 (digest_init): Likewise.
1403 (c_finish_return): Likewise.
1404 (build_conditional_expr): Adjust ep_convert_and_check calls.
1405 (convert_for_assignment): Add rhs_loc parameter. Use it.
1406 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1407 calls.
1408
fa337f3a
RB
14092014-01-30 Richard Biener <rguenther@suse.de>
1410
1411 PR c/59905
1412 * c-typeck.c (build_function_call_vec): Do not replace calls
1413 to a function via an incompatible type with a runtime abort.
1414
b72271b9
BI
14152014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1416
1417 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1418 flag_enable_cilkplus with flag_cilkplus.
1419 (c_parser_direct_declarator_inner): Likewise.
1420 (c_parser_attribute_any_word): Likewise.
1421 (c_parser_attributes): Likewise.
1422 (c_parser_compound_statement): Likewise.
1423 (c_parser_statement_after_labels): Likewise.
1424 (c_parser_if_statement): Likewise.
1425 (c_parser_switch_statement): Likewise.
1426 (c_parser_do_statement): Likewise.
1427 (c_parser_for_statement): Likewise.
1428 (c_parser_unary_expression): Likewise.
1429 (c_parser_postfix_expression): Likewise.
1430 (c_parser_postfix_expression_after_primary): Likewise.
1431 (c_parser_postfix_expression_after_primary): Likewise.
1432 (c_parser_omp_clause_name): Likewise.
1433 (c_finish_omp_declare_simd): Likewise.
1434 (c_parser_cilk_verify_simd): Likewise.
1435 * c-typeck.c (build_array_ref): Likewise.
1436 (build_function_call_vec): Likewise.
1437 (convert_arguments): Likewise.
1438 (build_compound_expr): Likewise.
1439 (c_finish_return): Likewise.
1440 (c_finish_if_stmt): Likewise.
1441 (c_finish_loop): Likewise.
1442 (build_binary_op): Likewise.
1443
393e8e8b
MP
14442014-01-23 Marek Polacek <polacek@redhat.com>
1445
1446 PR c/59846
1447 * c-typeck.c (parser_build_binary_op): Use location instead of
1448 input_location.
1449 (build_binary_op): Pass location to shorten_compare.
1450
f04dda30
MP
14512014-01-23 Marek Polacek <polacek@redhat.com>
1452
1453 PR c/58346
1454 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1455 an empty aggregate.
1456
789eadcd
MP
14572014-01-23 Marek Polacek <polacek@redhat.com>
1458
1459 PR c/59871
1460 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1461 of a comma expression.
1462 (emit_side_effect_warnings): Likewise.
1463
40f14e9f
BI
14642014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1465
1466 PR c/59825
1467 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1468 function to use walk_tree and moved a lot of its functionality to
1469 expand_array_notations.
1470 (expand_array_notations): New function.
1471
74558dd9
BI
14722014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1473
1474 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1475 attribute an attribute without value.
1476
652fea39
JJ
14772014-01-23 Jakub Jelinek <jakub@redhat.com>
1478
1479 PR middle-end/58809
1480 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1481 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1482
f34f1c87
MP
14832014-01-22 Marek Polacek <polacek@redhat.com>
1484
1485 PR c/59891
1486 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1487 of remove_c_maybe_const_expr on op1 and op2.
1488
241f845a
JJ
14892014-01-15 Jakub Jelinek <jakub@redhat.com>
1490
1491 PR c/58943
1492 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1493 effects, preevaluate rhs using SAVE_EXPR first.
1494
9a74f20c
BI
14952014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1496
1497 PR c++/59631
1498 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1499 statements with if-elseif statements.
1500
96066ce1
MP
15012014-01-06 Marek Polacek <polacek@redhat.com>
1502
1503 PR c/57773
1504 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1505 defined bit-field types only in ISO C.
1506
23a5b65a
RS
15072014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1508
1509 Update copyright years
1510
f9030485
RS
15112014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1512
1513 * c-array-notation.c: Use the standard form for the copyright notice.
1514
41958c28
BI
15152013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1516
1517 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1518 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1519 field in parser is not empty. If not-empty, call the function
1520 c_parser_finish_omp_declare_simd.
1521 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1522 between SIMD-enabled functions and #pragma simd. Added new parameter.
1523 (c_parser_cilk_all_clauses): Modified the usage of the function
1524 c_parser_cilk_clause_vectorlength as mentioned above.
1525 (c_parser_cilk_simd_fn_vector_attrs): New function.
1526 (c_finish_cilk_simd_fn_tokens): Likewise.
1527 (is_cilkplus_vector_p): Likewise.
1528 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1529 "nomask," and "mask" strings in clause name.
1530 (c_parser_omp_all_clauses): Added 3 new case statements:
1531 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1532 PRAGMA_CILK_CLAUSE_NOMASK.
1533 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1534 check for vector attribute and if so call the function
1535 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1536 called the function c_finish_cilk_simd_fn_tokens.
1537 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1538 parser field is non-empty. If so, parse them as you would parse
1539 the omp declare simd pragma.
1540 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1541 Added a check when step is a parameter and flag it as error.
1542 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1543 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1544 pragma_omp_clause.
1545
cef0fd0e
TS
15462013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1547
1548 * c-parser.c (c_parser_omp_parallel): Fix description.
1549
12893402
BI
15502013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1551
1552 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1553 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1554 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1555 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1556
296674db
JM
15572013-12-04 Joseph Myers <joseph@codesourcery.com>
1558
1559 PR c/52023
1560 * c-parser.c (c_parser_alignas_specifier): Use
1561 c_sizeof_or_alignof_type instead of c_alignof.
1562 (c_parser_alignof_expression): Likewise, with min_alignof
1563 parameter depending on alignof spelling used.
1564
edd28054
MP
15652013-12-04 Marek Polacek <polacek@redhat.com>
1566
1567 PR c/54113
1568 * c-decl.c (start_function): Don't warn for missing prototype for
1569 inline functions.
1570
da0fc454
MP
15712013-12-03 Marek Polacek <polacek@redhat.com>
1572
1573 PR c/59351
1574 * c-decl.c (build_compound_literal): Allow compound literals with
1575 empty initial value.
1576
4c2ecab0
JM
15772013-12-02 Joseph Myers <joseph@codesourcery.com>
1578
1579 PR c/58235
1580 * c-typeck.c (build_modify_expr): Diagnose assignment to
1581 expression with array type.
1582
340baef7
JM
15832013-11-29 Joseph Myers <joseph@codesourcery.com>
1584
1585 PR c/42262
1586 * c-typeck.c (process_init_element): Do not treat a string as
1587 initializing a whole array when used with a designator for an
1588 individual element.
1589
6763b9f7
JM
15902013-11-29 Joseph Myers <joseph@codesourcery.com>
1591
1592 PR c/57574
1593 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1594 an inline function following a static declaration.
1595
e7bd1de1
JJ
15962013-11-28 Jakub Jelinek <jakub@redhat.com>
1597
1598 PR c/59310
1599 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1600 to p_name before calling c_parser_omp_teams instead of after.
1601 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1602 argument. Remove unused p_name variable.
1603
0136f8f0
AH
16042013-11-27 Aldy Hernandez <aldyh@redhat.com>
1605 Jakub Jelinek <jakub@redhat.com>
1606
1607 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1608 external_scope is NULL.
1609
241b71bb
TV
16102013-11-27 Tom de Vries <tom@codesourcery.com>
1611 Marc Glisse <marc.glisse@inria.fr>
1612
1613 PR c++/59032
1614 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1615
2fb9a547
AM
16162013-11-22 Andrew MacLeod <amacleod@redhat.com>
1617
1618 * c-typeck.c: Add required include files from gimple.h.
1619
8400e75e
DM
16202013-11-22 David Malcolm <dmalcolm@redhat.com>
1621
1622 * c-decl.c (define_label, shadow_tag_warned)
1623 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1624 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1625 (declspecs_add_type): Remove use of in_system_header macro.
1626 * c-parser.c (c_parser_unary_expression): Likewise.
1627 * c-typeck.c (store_init_value, process_init_element)
1628 (c_start_case): Likewise.
1629
1630 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1631 macro.
1632
1633 * c-parser.c (c_parser_set_source_position_from_token): Remove
1634 reference to in_system_header from comment.
1635
386b1f1f
RS
16362013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1637
1638 * c-decl.c (grokdeclarator): Update comment to refer to
1639 tree_to_[su]hwi rather than tree_low_cst.
1640
ae7e9ddd
RS
16412013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1642
1643 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1644 tree_to_uhwi throughout.
1645
9439e9a1
RS
16462013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1647
1648 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1649 throughout.
1650
9541ffee
RS
16512013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1652
1653 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1654 throughout.
1655
c02065fc
AH
16562013-11-15 Aldy Hernandez <aldyh@redhat.com>
1657
1658 * c-parser.c (c_parser_cilk_simd): New.
1659 (c_parser_cilk_verify_simd): New.
1660 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1661 (c_parser_omp_for_loop): Add case for NE_EXPR.
1662 Set c_break_label for CILK_SIMD.
1663 (c_parser_cilk_clause_vectorlength): New.
1664 (c_parser_cilk_clause_linear): New.
1665 (c_parser_cilk_clause_name): New.
1666 (c_parser_cilk_all_clauses): New.
1667 * c-typeck.c (build_unary_op): Pass location argument to
1668 readonly_error.
1669 (build_modify_expr): Same.
1670 (build_asm_expr): Same.
1671 (c_finish_bc_stmt): Error on break/continue in loops.
1672
18f429e2
AM
16732013-11-14 Andrew MacLeod <amacleod@redhat.com>
1674
1675 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1676
d8a2d370
DN
16772013-11-14 Diego Novillo <dnovillo@google.com>
1678
1679 * c-decl.c: Include print-tree.h.
1680 Include stor-layout.h.
1681 Include varasm.h.
1682 Include attribs.h.
1683 Include stringpool.h.
1684 * c-lang.c: Include fold-const.h.
1685 * c-parser.c: Include stringpool.h.
1686 Include attribs.h.
1687 Include stor-layout.h.
1688 Include varasm.h.
1689 Include trans-mem.h.
1690 * c-typeck.c: Include stor-layout.h.
1691 Include trans-mem.h.
1692 Include varasm.h.
1693 Include stmt.h.
1694
38b7bc7f
JM
16952013-11-13 Joseph Myers <joseph@codesourcery.com>
1696
1697 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1698 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1699 __auto_type.
1700 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1701 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1702 RID_AUTO_TYPE.
1703 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1704 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1705 (c_parser_declarator, c_parser_direct_declarator_inner)
1706 (c_parser_parameter_declaration, c_parser_type_name): All callers
1707 changed.
1708 (c_parser_declaration_or_fndef): Handle declarations with type
1709 determined from the initializer.
1710
45b0be94
AM
17112013-11-12 Andrew MacLeod <amacleod@redhat.com>
1712
18f429e2 1713 * c-typeck.c: Include gimplify.h.
45b0be94 1714
582d9b50
JM
17152013-11-12 Joseph Myers <joseph@codesourcery.com>
1716
1717 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1718 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1719 comment.
1720 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1721 or _Thread_local as appropriate in diagnostics.
1722 (build_null_declspecs): Initialize ret->thread_gnu_p.
1723 (declspecs_add_scspec): Handle either __thread or _Thread_local
1724 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1725 pedantic. Do not disallow _Thread_local extern and _Thread_local
1726 static.
1727
267bac10
JM
17282013-11-07 Joseph Myers <joseph@codesourcery.com>
1729 Andrew MacLeod <amacleod@redhat.com>
1730
1731 * c-aux-info.c (gen_type): Handle atomic qualifier.
1732 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1733 qualifiers when compating types.
1734 (shadow_tag_warned): Handle atomic_p in declspecs.
1735 (quals_from_declspecs): Likewise.
1736 (start_decl): Use c_type_promotes_to when promoting argument
1737 types.
1738 (grokdeclarator): Handle _Atomic.
1739 (get_parm_info): Diagnose any qualifier on "void" as only
1740 parameter.
1741 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1742 comparing types. Use c_type_promotes_to when promoting argument
1743 types.
1744 (finish_function): Use c_type_promotes_to when promoting argument
1745 types.
1746 (build_null_declspecs): Handle atomic_p in declspecs.
1747 (declspecs_add_qual): Handle RID_ATOMIC.
1748 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1749 (c_token_starts_declspecs): Handle RID_ATOMIC.
1750 (c_parser_declspecs): Handle atomic type specifiers and
1751 qualifiers.
1752 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1753 from types of expressions with atomic type.
1754 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1755 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1756 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1757 (c_parser_statement_after_labels, c_parser_switch_statement)
1758 (c_parser_for_statement, c_parser_expr_no_commas)
1759 (c_parser_conditional_expression, c_parser_binary_expression)
1760 (c_parser_cast_expression, c_parser_unary_expression)
1761 (c_parser_postfix_expression)
1762 (c_parser_postfix_expression_after_primary, c_parser_expression):
1763 Use convert_lvalue_to_rvalue.
1764 (c_parser_expression_conv, c_parser_expr_list): Document
1765 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1766 (c_parser_objc_synchronized_statement): Use
1767 convert_lvalue_to_rvalue.
1768 (c_parser_objc_selector): Handle RID_ATOMIC.
1769 (c_parser_objc_receiver, c_parser_array_notation): Use
1770 convert_lvalue_to_rvalue.
1771 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1772 _Atomic (type-name).
1773 (struct c_declspecs): Add atomic_p field.
1774 (convert_lvalue_to_rvalue): Declare.
1775 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1776 corresponding atomic types.
1777 (qualify_type): Don't add _Atomic qualifiers from second argument.
1778 (comp_target_types): Do not allow _Atomic mismatches.
1779 (type_lists_compatible_p): Do not remove atomic qualifiers when
1780 comparing types.
1781 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1782 (build_atomic_assign): New functions.
1783 (build_unary_op): Use build_atomic_assign for atomic increment and
1784 decrement.
1785 (build_conditional_expr): Do not treat _Atomic void as a qualified
1786 version of void.
1787 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1788 (find_anonymous_field_with_type, convert_to_anonymous_field)
1789 (convert_for_assignment): Do not remove atomic qualifiers when
1790 comparing types.
1791 (digest_init): Do not accept initialization of arrays of atomic
1792 elements by string constants.
1793 (build_asm_expr): Use convert_lvalue_to_rvalue.
1794 (build_binary_op): Do not treat _Atomic void as a qualified
1795 version of void.
1796
0c249d4b
DD
17972013-11-06 DJ Delorie <dj@redhat.com>
1798
1799 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1800 both explicit and builtin, print the location of the explicit one.
1801
6d7f7e0a
TB
18022013-11-05 Tobias Burnus <burnus@net-b.de>
1803
1804 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1805 c_parser_omp_distribute, c_parser_omp_teams,
1806 c_parser_omp_target, c_parser_omp_declare): Handle
1807 -fopenmp-simd.
1808
b906f4ca
MP
18092013-11-03 Marek Polacek <polacek@redhat.com>
1810
1811 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1812
ee1d5a02
JJ
18132013-11-01 Jakub Jelinek <jakub@redhat.com>
1814
1815 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1816 check_dup_generic at the end, unless remove is true.
1817 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1818 remove = true;.
1819 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1820
5a9785fb
JJ
18212013-10-31 Jakub Jelinek <jakub@redhat.com>
1822
1823 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1824 with decl that is not pointer nor array.
1825
939b37da
BI
18262013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1827
1828 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1829 a spawning function is found.
1830 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1831 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1832 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1833 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1834 case.
1835 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1836 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1837 expr.
1838 (c_finish_return): Added a check to reject _Cilk_spawn in return
1839 expression.
1840 (build_cilk_spawn): New function.
1841 (build_cilk_sync): Likewise.
1842 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1843
d4af74d4
TB
18442013-10-27 Tobias Burnus <burnus@net-b.de>
1845
1846 PR other/33426
1847 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1848 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1849 (c_parser_statement_after_labels): Update calls.
1850
d73749df 18512013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
1852
1853 PR other/33426
1854 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1855 Handle PRAGMA_IVDEP.
1856 (c_parser_statement_after_labels): Update call.
1857
f28aa681
MP
18582013-10-24 Marek Polacek <polacek@redhat.com>
1859
1860 * c-parser.c (c_parser_struct_declaration): Add a comment.
1861 (c_parser_declarator): Don't allow _Alignas here.
1862
0645c1a2
AM
18632013-10-17 Andrew MacLeod <amacleod@redhat.com>
1864
1865 * c-parser.c: Include omp-low.h.
1866 * c-typeck.c: Likewise.
1867
568a31f2
MP
18682013-10-17 Marek Polacek <polacek@redhat.com>
1869
1870 PR c/58267
1871 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1872 Document syntax of the array-declarator.
1873 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1874 are not permitted.
1875 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1876 (c_parser_struct_declaration): Likewise.
1877 (c_parser_declarator): Likewise.
1878 (c_parser_direct_declarator_inner): Likewise.
1879 (c_parser_parameter_declaration): Likewise.
1880 (c_parser_type_name): Likewise.
1881
acf0174b
JJ
18822013-10-11 Jakub Jelinek <jakub@redhat.com>
1883
1884 * c-lang.h (current_omp_declare_target_attribute): New extern
1885 decl.
1886 * c-parser.c: Include c-lang.h.
1887 (struct c_parser): Change tokens to c_token *.
1888 Add tokens_buf field. Change tokens_avail type to unsigned int.
1889 (c_parser_consume_token): If parser->tokens isn't
1890 &parser->tokens_buf[0], increment parser->tokens.
1891 (c_parser_consume_pragma): Likewise.
1892 (enum pragma_context): Add pragma_struct and pragma_param.
1893 (c_parser_external_declaration): Adjust
1894 c_parser_declaration_or_fndef caller.
1895 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1896 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1897 Adjust recursive call.
1898 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1899 of pragma_external.
1900 (c_parser_parameter_declaration): Use pragma_param instead of
1901 pragma_external.
1902 (c_parser_compound_statement_nostart, c_parser_label,
1903 c_parser_for_statement): Adjust
1904 c_parser_declaration_or_fndef callers.
1905 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1906 it through to c_parser_conditional_expression.
1907 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1908 pass it through to c_parser_binary_expression. Adjust recursive
1909 call.
1910 (c_parser_binary_expression): Remove prec argument, add
1911 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1912 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1913 binop matches it, use build2 instead of parser_build_binary_op.
1914 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1915 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1916 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1917 Handle pragma_struct and pragma_param the same as pragma_external.
1918 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1919 (c_parser_omp_variable_list): Parse array sections for
1920 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1921 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1922 (c_parser_omp_clause_reduction): Handle user defined reductions.
1923 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1924 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1925 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1926 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1927 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1928 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1929 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1930 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1931 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1932 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1933 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1934 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1935 (c_parser_omp_for_loop): Add CODE argument, pass it through
1936 to c_finish_omp_for. Change last argument to cclauses,
1937 and adjust uses to grab parallel clauses from the array of all
1938 the split clauses. Adjust c_parser_binary_expression,
1939 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1940 (omp_split_clauses): New function.
1941 (c_parser_omp_simd): New function.
1942 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1943 Allow the function to be called also when parsing combined constructs,
1944 and call c_parser_omp_simd when parsing for simd.
1945 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1946 #pragma omp section, require exactly one structured-block instead of
1947 sequence of statements.
1948 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1949 Allow the function to be called also when parsing combined constructs.
1950 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1951 Allow the function to be called also when parsing combined
1952 constructs.
1953 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1954 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1955 c_parser_omp_teams, c_parser_omp_target_data,
1956 c_parser_omp_target_update, c_parser_omp_target,
1957 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1958 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1959 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1960 (c_parser_omp_construct): Add p_name and mask vars. Handle
1961 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1962 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1963 and c_parser_omp_sections callers.
1964 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1965 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1966 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1967 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1968 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1969 OMP_CLAUSE_DEPEND.
1970 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1971 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1972 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1973 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1974 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1975 * c-typeck.c: Include tree-inline.h.
1976 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1977 handle_omp_array_sections_1, handle_omp_array_sections,
1978 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1979 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1980 user defined reductions.
1981 (c_tree_equal): New function.
1982 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1983 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1984 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1985 c_check_omp_declare_reduction_r): New prototypes.
1986 * c-decl.c (current_omp_declare_target_attribute): New variable.
1987 (c_decl_attributes): New function.
1988 (start_decl, start_function): Use it instead of decl_attributes.
1989 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1990 c_omp_reduction_decl, c_omp_reduction_lookup,
1991 c_check_omp_declare_reduction_r): New functions.
1992
0a6c2227
TT
19932013-09-25 Tom Tromey <tromey@redhat.com>
1994
1995 * Make-lang.in (c/gccspec.o): Remove.
1996 (CFLAGS-c/gccspec.o): New variable.
1997 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1998 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1999 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2000
f3bc55f0
TT
20012013-09-25 Tom Tromey <tromey@redhat.com>
2002
2003 * Make-lang.in (c/gccspec.o): Don't use subshell.
2004
a24d975c
MP
20052013-09-18 Marek Polacek <polacek@redhat.com>
2006
2007 PR sanitize/58443
2008 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2009 Remove unnecessary check.
2010
ce6923c5
MP
20112013-09-18 Marek Polacek <polacek@redhat.com>
2012
2013 PR sanitizer/58411
2014 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2015 no_sanitize_undefined attribute.
2016
a1e51df9
KT
20172013-09-13 Kai Tietz <ktietz@redhat.com>
2018
2019 PR target/57848
2020 * c-decl.c (c_builtin_function_ext_scope): Remove
2021 wrong assumption that it is never called on prexisting
2022 symbol.
2023
0af94e6f
JR
20242013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2025
2026 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2027
20059c8b
GDR
20282013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2029
2030 * c-objc-common.c (c_tree_printer): Tidy.
2031
de5a5fa1
MP
20322013-08-30 Marek Polacek <polacek@redhat.com>
2033
2034 * c-typeck.c (build_binary_op): Add division by zero and shift
2035 instrumentation.
2036
2531a1d9 20372013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 2038 Joseph Myers <joseph@codesourcery.com>
2531a1d9 2039
6e2bcc98 2040 PR c/35649
2531a1d9
JR
2041 * c-typeck.c (c_common_type): Prefer double_type_node over
2042 other REAL_TYPE types with the same precision.
2043 (convert_arguments): Likewise.
2044
025311c4
GDR
20452013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2046
2047 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2048 (c_initialize_diagnostics): Call a destructor for the early printer.
2049
da6ca2b5
GDR
20502013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2051
2052 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2053 printer initialization.
2054
318cda85 20552013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 2056
318cda85
BI
2057 PR c/57490
2058 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2059 check for truth values.
2060 (expand_array_notation_exprs): Added truth values case. Removed an
2061 unwanted else. Added for-loop to walk through subtrees in default
2062 case.
2063
b066401f
GDR
20642013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2065
2066 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2067
fb48aadc
JM
20682013-07-23 Joseph Myers <joseph@codesourcery.com>
2069
2070 * c-parser.c (struct c_generic_association): Fix typo.
2071
433cc7b0
TT
20722013-07-23 Tom Tromey <tromey@redhat.com>
2073 Joseph Myers <joseph@codesourcery.com>
2074
2075 * c-parser.c (struct c_generic_association): New.
2076 (c_generic_association_d): New typedef.
2077 (c_parser_generic_selection): New function.
2078 (c_parser_postfix_expression): Handle RID_GENERIC.
2079
26d40c3d
JM
20802013-07-13 Jason Merrill <jason@redhat.com>
2081
2082 PR c++/57793
2083 * c-decl.c (finish_struct): Check for too-large class.
2084
ecdbd01a 20852013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
2086
2087 PR c/57821
2088 * c-typeck.c (set_init_index): When folding, check for index overflow.
2089
1141ed3f
BI
20902013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2091
2092 * c-parser.c (c_parser_array_notation): Removed rejection of array
2093 notations in an array of function pointers.
2094
713b46fa
BI
20952013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2096
2097 * c-array-notation.c (make_triplet_val_inv): New function.
2098 (create_cmp_incr): Likewise.
2099 (create_array_refs): Likewise.
2100 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2101 Also modularized common parts between functions and called the function.
2102 (build_array_notation_expr): Likewise.
2103 (fix_conditional_array_notations_1): Likewise.
2104 (fix_array_notation_expr): Likewise.
2105 (fix_array_notation_call_expr): Likewise.
2106
92f20202
MP
21072013-06-18 Marek Polacek <polacek@redhat.com>
2108
2109 PR c/57630
2110 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2111
73a23b06
BI
21122013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2113
2114 * c-array-notation.c (build_array_notation_expr): Reject array notation
2115 mismatch between LHS and RHS even inside a call_expr. Also, removed
2116 a couple while statements that were dead code.
2117
00b8517d
BI
21182013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2119
2120 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2121 excessive precision expressions in function parameters. Also removed
2122 couple unwanted while statements.
2123
1509bdda
BI
21242013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2125
2126 * c-array-notation.c (expand_array_notation_exprs): Added
2127 ARRAY_NOTATION_REF case.
2128
d60f1706
BI
21292013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2130
2131 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2132 function to c-family/array-notation-common.c.
2133 (is_cilkplus_reduce_builtin): Likewise.
2134 (find_rank): Likewise.
2135 (extract_array_notation_exprs): Likewise.
2136 (replace_array_notations): Likewise.
2137 (find_inv_trees): Likewise.
2138 (replace_inv_trees): Likewise.
2139 (contains_array_notation_expr): Likewise.
2140 (find_correct_array_notation_type): Likewise.
2141 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2142 (struct inv_list): Moved this to c-family/array-notation-common.c.
2143 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2144
6d6efbb3
BI
21452013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2146
2147 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2148 reduction functions outside the for-loop. Added a check if the fundecl
2149 is non-NULL. Finally, removed an unwanted if-statement, and made the
2150 body unconditional.
2151
25c22937
BI
21522013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2153
2154 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2155 condition of the if-statement matches the rank of else-block and then-
2156 block when array notations are used.
2157 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2158 expression after the entire function body is parsed.
2159 (c_parser_expr_no_commas): Delayed creating array notation expressions
2160 to the end of function parsing.
2161 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2162 whole if-statement instead of just the condition.
2163 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2164
edd25645
BI
21652013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2166
2167 PR c/57474
2168 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2169 array to NULL_TREE if they are unused. Also added a check for the
2170 field to be NULL before its fields are used in future.
2171
065ce7f1
RO
21722013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2173
2174 PR bootstrap/57450
2175 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2176 (build_array_notation_expr): Likewise.
2177
36536d79
BI
21782013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2179
2180 * c-typeck.c (build_array_ref): Added a check to see if array's
2181 index is greater than one. If true, then emit an error.
2182 (build_function_call_vec): Exclude error reporting and checking
2183 for builtin array-notation functions.
2184 (convert_arguments): Likewise.
2185 (c_finish_return): Added a check for array notations as a return
2186 expression. If true, then emit an error.
2187 (c_finish_loop): Added a check for array notations in a loop
2188 condition. If true then emit an error.
2189 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2190 (build_binary_op): Added a check for array notation expr inside
2191 op1 and op0. If present, we call another function to find correct
2192 type.
2193 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2194 * c-parser.c (c_parser_compound_statement): Check if array
2195 notation code is used in tree, if so, then transform them into
2196 appropriate C code.
2197 (c_parser_expr_no_commas): Check if array notation is used in LHS
2198 or RHS, if so, then build array notation expression instead of
2199 regular modify.
2200 (c_parser_postfix_expression_after_primary): Added a check for
2201 colon(s) after square braces, if so then handle it like an array
2202 notation. Also, break up array notations in unary op if found.
2203 (c_parser_direct_declarator_inner): Added a check for array
2204 notation.
2205 (c_parser_compound_statement): Added a check for array notation in
2206 a stmt. If one is present, then expand array notation expr.
2207 (c_parser_if_statement): Likewise.
2208 (c_parser_switch_statement): Added a check for array notations in
2209 a switch statement's condition. If true, then output an error.
2210 (c_parser_while_statement): Similarly, but for a while.
2211 (c_parser_do_statement): Similarly, but for a do-while.
2212 (c_parser_for_statement): Similarly, but for a for-loop.
2213 (c_parser_unary_expression): Check if array notation is used in a
2214 pre-increment or pre-decrement expression. If true, then expand
2215 them.
2216 (c_parser_array_notation): New function.
2217 * c-array-notation.c: New file.
2218 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2219
cd192ccc
MS
22202013-05-23 Mike Stump <mikestump@comcast.net>
2221
2222 * c-typeck.c (convert_for_assignment): Handle references to memory
2223 spaces better.
2224
427b248d
JM
22252013-05-16 Jason Merrill <jason@redhat.com>
2226
2227 * Make-lang.in (cc1$(exeext)): Use link mutex.
2228
44d90fe1
PC
22292013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2230
2231 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2232 to simply use OPT_Wpointer_arith.
2233 (build_unary_op): Likewise.
2234
4e7d7b3d
JJ
22352013-04-03 Jakub Jelinek <jakub@redhat.com>
2236
2237 PR c/19449
2238 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2239 argument. If set, or it temporarily for parsing of the first
2240 argument into force_folding_builtin_constant_p.
2241 (c_parser_postfix_expression): Adjust callers.
2242
839b422f
RB
22432013-03-21 Richard Biener <rguenther@suse.de>
2244
2245 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2246 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2247
2ee028f1
MP
22482013-02-12 Marek Polacek <polacek@redhat.com>
2249
2250 PR c/44938
2251 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2252 origtypes to NULL.
2253
8824edff
JJ
22542013-01-24 Jakub Jelinek <jakub@redhat.com>
2255
2256 PR c/56078
2257 * c-typeck.c (set_nonincremental_init_from_string): If
2258 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2259 returned false.
2260 (process_init_element): Likewise.
2261
eadd3d0d
JJ
22622012-12-20 Jakub Jelinek <jakub@redhat.com>
2263
2264 PR c++/55619
2265 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2266 argument, don't call default_function_array_conversion
2267 nor c_fully_fold here.
2268 (c_parser_asm_statement): Adjust callers.
2269 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2270 and outputs here, and call default_function_array_conversion
2271 on inputs that don't need to be addressable.
2272
f8a93a2e
JJ
22732012-12-18 Jakub Jelinek <jakub@redhat.com>
2274
2275 PR c/39464
2276 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2277 warning require that both c_common_unsigned_type as well as
2278 c_common_signed_type is the same for both mvl and mvr types.
2279
9771b263
DN
22802012-11-16 Diego Novillo <dnovillo@google.com>
2281
2282 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2283
2284 * c-common.c: Use new vec API in vec.h.
2285 * c-common.h: Likewise.
2286 * c-gimplify.c: Likewise.
2287 * c-pragma.c: Likewise.
2288 * c-pretty-print.c: Likewise.
2289 * c-pretty-print.h: Likewise.
2290 * c-semantics.c: Likewise.
2291 * c-decl.c: Likewise.
2292 * c-parser.c: Likewise.
2293 * c-tree.h: Likewise.
2294 * c-typeck.c: Likewise.
2295
880661a4
JW
22962012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2297
2298 PR c++/54930
2299 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2300
077d1abe
MLI
23012012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2302
2303 PR c/53066
2304 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2305 shadows a function, unless the variable is a function or a
2306 pointer-to-function.
2307
3a785c97
JJ
23082012-10-12 Jakub Jelinek <jakub@redhat.com>
2309
2310 PR c/54381
2311 * c-parser.c (struct c_tree_loc_pair): Removed.
2312 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2313 add location_t * and tree * arguments, fill in array of 3
2314 sizeof_arg trees and corresponding locs.
2315 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2316 c_parser_expr_list callers.
2317 (c_parser_postfix_expression_after_primary): Likewise. Pass
2318 array of 3 sizeof_arg trees and locs (corresponding to first
2319 3 arguments) to sizeof_pointer_memaccess_warning.
2320
703c8606
LC
23212012-10-09 Lawrence Crowl <crowl@google.com>
2322
2323 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2324 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2325 hash table.
2326
5d9de0d0
PC
23272012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2328
2329 PR c++/54194
2330 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2331 call.
2332
a212e43f
MG
23332012-10-09 Marc Glisse <marc.glisse@inria.fr>
2334
2335 PR c++/54427
2336 * c-typeck.c: Include c-common.h.
2337 (enum stv_conv): Moved to c-common.h.
2338 (scalar_to_vector): Moved to c-common.c.
2339 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2340 * Make-lang.in: c-typeck.c depends on c-common.h.
2341
3b78de56
AC
23422012-10-04 Arnaud Charlet <charlet@adacore.com>
2343
2344 * c-decl.c (c_write_global_declarations): Fix handling of
2345 -fdump-ada-spec*.
2346
78c60e3d
SS
23472012-09-30 Sharad Singhai <singhai@google.com>
2348
2349 * c-decl.c (c_write_global_declarations): Use a different method
2350 to determine if the dump has ben initialized.
2351
9f33203d
JM
23522012-09-14 Joseph Myers <joseph@codesourcery.com>
2353
2354 PR c/54552
2355 * c-typeck.c (c_cast_expr): When casting to a type requiring
2356 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2357 c_fully_fold first.
2358
a27d595d
JM
23592012-09-14 Joseph Myers <joseph@codesourcery.com>
2360
2361 PR c/54103
2362 * c-typeck.c (build_unary_op): Pass original argument of
2363 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2364 any C_MAYBE_CONST_EXPR, if it has integer operands.
2365 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2366 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2367 to c_objc_common_truthvalue_conversion, then remove any
2368 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2369 c_objc_common_truthvalue_conversion not
2370 c_common_truthvalue_conversion.
2371 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2372 call note_integer_operands for arguments with integer operands
2373 that are not integer constants.
2374
9feb29df
JJ
23752012-09-13 Jakub Jelinek <jakub@redhat.com>
2376
2377 PR c/54559
2378 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2379 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2380
d409320c
JJ
23812012-08-31 Jakub Jelinek <jakub@redhat.com>
2382
2383 PR c/54428
2384 * c-convert.c (convert): Don't call fold_convert_loc if
2385 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2386 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2387 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2388
6265d07c
JJ
23892012-08-24 Jakub Jelinek <jakub@redhat.com>
2390
2391 PR c/54355
2392 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2393 for nested and empty_ok arguments in the call to
2394 c_parser_declaration_or_fndef.
2395
1a4049e7
JJ
23962012-08-17 Jakub Jelinek <jakub@redhat.com>
2397
2398 * c-tree.h (c_last_sizeof_arg): Declare.
2399 * c-parser.c (struct c_tree_loc_pair): New type.
2400 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2401 non-NULL.
2402 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2403 (c_parser_postfix_expression_after_primary): Likewise. Call
2404 sizeof_pointer_memaccess_warning if needed.
2405 (sizeof_ptr_memacc_comptypes): New function.
2406 * c-typeck.c (c_last_sizeof_arg): New global variable.
2407 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2408
0229aee9
UB
24092012-07-24 Uros Bizjak <ubizjak@gmail.com>
2410
2411 * c-lang.h (lang_decl): Add variable_size GTY option.
2412
7ee2468b
SB
24132012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2414
2415 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2416 * Make-lang.in: Fix dependencies.
2417
d4a10d0a
SB
24182012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2419
2420 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2421 and add language Makefile hooks.
2422 * config-lang.in: New file.
2423 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2424 add the required "normal" config-lang.in rules.
2425 * c-lang.h: Moved from gcc/ to here.
2426 * c-tree.h: Likewise.
2427 * c-objc-common.c: Likewise.
2428 * c-objc-common.h: Likewise.
2429 * c-typeck.c: Likewise.
2430 * c-convert.c: Likewise.
2431 * c-lang.c: Likewise.
2432 * c-aux-info.c: Likewise.
2433 * c-errors.c: Likewise.
2434 * gccspec.c: Likewise.
2435 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2436 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2437\f
5624e564 2438Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2439
2440Copying and distribution of this file, with or without modification,
2441are permitted in any medium without royalty provided the copyright
2442notice and this notice are preserved.